Solve for a a(g-h)=m