There exist one-to-one and onto function between X and Y implies $|X| = |Y|$.
Hence, $|A| = |B|$ and $|A|^2 = |A| + |B| - |A \cap B|$.
Can $|A| = 1$?
Yes, when $|A| = |B| = |A \cap B| = 1$.
Can $|A| = 2$?
Yes, when $|A| = |B| = 2, |A \cap B| = 0$.
For larger values of $|A|$, $|A|^2 > |A| + |B|$.
Therefore, only 2 values are possible for $|A|$.