Show a line in the form $ax+by=c$? I'm having trouble with a question which states:
Point $M$ has coordinates $(3,5)$. Points $A$ and $B$ lie on the coordinate axes and have coordinates $(0,p)$ and $(q,0)$ so that $AMB$ is a right angle. Show that $5p+3q=34$.
Edit - solved:
I used the gradient  $\frac{p-5}{-3}$ $*$ $\frac{p-5}{-3}$ = -1
and multiplied the fractions together to give me $\frac{-5p+25}{-3q+9}$ = -1.
Then I cross-multiplied and got $-5p+25=3q-9$ and then rearranged the equation from there.

We can proceed as follows


*

*the slope A-M is $$\frac{y_A-y_M}{x_A-x_M}=\frac{p-5}{-3}$$

*the slope B-M is $$\frac{y_B-y_M}{x_B-x_M}=\frac{-5}{q-3}$$
and we need
$$\frac{p-5}{-3}\cdot \frac{-5}{q-3}=-1$$
