Express Ksp in terms of molar solubility, x, for a salt with a formula of AB(s)

Express Ksp in terms of molar solubility, x, for a salt with a formula of
AB(s)
AB2(s)
AB3(s)
A3B2(s)