I had the same issue when I encountered a similar problem. Here is how it goes:
Suppose M is Barium in M(OH)2
BaOH2 --> Ba2+ + 2OH-
In that case, it's Ba(OH)2 and Ksp would be set up as follows:
Ksp = [Ba2+][OH-]^2
Ksp = [x][2x]^2
Ksp = x*4x^2
Ksp = 4x^3