The 22210 part of the part number is just Yamaha's universal number for a rear shock. The prefix tells you what bike its for, the middle part tells you what it is, and the suffix(es) tell you colour/oversize/revision number. The exceptions are generic bits like bearings and seals and springs, which have their own numbering system.
So... those numbers tell you that the 250C and 125X have rear shocks
and that they're different to each other.
Whether the differences are big or small is the real question...
Oddly, the 125X/175C complete shocks have a different part number to the complete 250/400C shock, but every individual part appears to be the same?!
Definitely the big/obvious stuff like spring, body, shaft and valve assembly are the same, so I can only assume that they're the same shock.
Edit for Mr Crocket: Nope, that's my understanding too.