$[\mathrm{X}]=1 \times 10^{-3} \mathrm{M}$
$[\mathrm{Y}]=2 \times 10^{-3} \mathrm{M}$
$\mathrm{XY}_{2}(\mathrm{s}) \rightleftharpoons \mathrm{X}_{(\mathrm{aq}, )}^{2+}+2 \mathrm{Y}_{(\mathrm{aq})}^{-}$
$\mathrm{K_{sp}}=\left[\mathrm{X}^{2+}\right][\mathrm{Y}^-]^{2}$
$=\left(10^{-3}\right)\left(2 \times 10^{-3}\right)^{2}$
$=4 \times 10^{-9} \mathrm{M}^{3}$