Hello,

(talking about Y is an extraneous information)

The solution lies in the definition of

For any , there isat least oneelement such that

It also means that for any , there isat least onesuch that

You can see that this sentence is exactly the definition of a surjection.

Hence is a surjection. By Cantor-Bernstein theorem (I think it's this one), we have

If X is finite, then . So we have . Thus f(X) is finite.

If X is countable, then , etc...

If you see any mistake, tell me, I'm learning this stuff too