Solve equations with the distributive property