Find the equation of the line perpendicular to the line joining the points $A(3,6)$ and $B(-6,9)$, which divides the line $AB$ in the ratio of $2:1$.
My attempt: Equation of $AB$ is $$y-y_1=\frac{y_2-y_1}{x_2-x_1} (x-x_1)$$ $$y-6=\frac{9-6}{-6-3} (x-3)$$ So, $$x+3y-21=0$$ is the equation of AB. Now, how should I complete the rest.?
To build the line you need a point and a direction. Thus:
Given points $A$ and $B$, the point $C=(1-t)A+tB$, with $t\in[0,1]$, lies in the segment $\overline{AB}$ (for $t=0$ you have $A$ and for $t=1$, $B$). Since you need the ratio 2:1, take $t=2/3$ (why?).
For the direction, if you are given a direction $(r,s)$ on the 2D plane, the perpendicular direction is given by $(-s,r)$. Use $A$ and $B$ you compute $r$ and $s$.
EDIT: Since you already have the equation of the line through $A$ and $B$, you can also take into account this: the lines of the form $3x-y+c=0$ (with $c\in\mathbb{R}$) are perpendicular to $x+3y-21=0$ (you can check this using my second hint). Now, you just need to plug in the coordinates of the point of hint 1 to compute the $c$ you are looking for.