All of these assume no further reaction, and this nearly always is a poor assumption! Also, x stand for the molar solubility of the substance.
There are two problem categories: given molar solubility, find Ksp, and given Ksp, find molar solubility.