I don't see where the 4 is coming from. Did I miss something?
Always write an equation first. Any problem can be solved with an equation to look at.
XY2(s) <----> X2+(aq) + 2Y -(aq)
lizardo Ksp is much like Kw, in that the solid mass (precipitate) is constant. Treated as a pure solid, we have
K = [X2+][Y -]2
[XY2]
Since XY2 is constant, we carry this term to K, giving
K[XY2] = [X2+][Y -]2
or alternatively,
Ksp = [X2+][Y -]2, where if the concentrations of both ions are unknown, they can be designated as x. Notice that the anion is x2 because there are 2 mol of anion for every 1 mol of cation.
This can be written as Ksp = x*x2, or Ksp = x3