You have to get y by itself, so for the first one we will subtract mx from both sides to get ky=-mx+j, now the last step is to divide by k to leave y and be left with y=-mx/k+j/k that would be your first answer... Now do the same with the otehr one to get y=-hx/g+f/g
hope this helps