The equations of two sides of a triangle are $\;$ $2x - y = 0$ $\;$ and $\;$ $x + 3y - 7 = 0$. The orthocenter is the point $\left(2,1\right)$. Find the equation of the third side.
The sides of the triangle are
$2x - y = 0$ $\;\;\; \cdots \; (1)$, $\;$ $x + 3y - 7 = 0$ $\;\;\; \cdots \; (2)$
Let the equation of the third side of the triangle be $\;$ $ax + by + c = 0$ $\;\;\; \cdots \; (3)$
Let equations $(1)$ and $(2)$ intersect at point $A$.
Let equations $(2)$ and $(3)$ intersect at point $B$.
Solving equations $(1)$ and $(2)$ simultaneously gives the point of intersection as $\;$ $A \left(x_1, y_1\right) = \left(1, 2\right)$
Solving equations $(2)$ and $(3)$ simultaneously gives the point of intersection as $\;$ $B \left(x_2, y_2\right) = \left(\dfrac{-7b-3c}{3a-b}, \dfrac{7a+c}{3a-b}\right)$
Let $AD$ be the altitude drawn from point $A$ to line given by equation $(3)$.
Slope of equation $(3)$ is $m_1 = \dfrac{-a}{b}$
$\therefore \;$ Slope of altitude $AD = \dfrac{-1}{m_1} = \dfrac{b}{a}$
$AD$ passes through the point $A$ and has slope $\dfrac{-1}{m_1}$.
$\therefore \;$ Equation of $AD$ is
$y - 2 = \dfrac{b}{a} \left(x - 1\right)$
i.e. $\;$ $ay - 2a= bx - b$
i.e. $\;$ $bx - ay + 2a-b = 0$ $\;\;\; \cdots \; (4)$
Let $BE$ be the altitude drawn from point $B$ to line given by equation $(1)$.
Slope of equation $(1)$ is $m_2 = 2$
$\therefore \;$ Slope of altitude $BE = \dfrac{-1}{m_2} = \dfrac{-1}{2}$
$BE$ passes through the point $B$ and has slope $\dfrac{-1}{m_2}$.
$\therefore \;$ Equation of $BE$ is
$y - \left(\dfrac{7a + c}{3a - b}\right) = \dfrac{-1}{2} \left[x + \dfrac{7b + 3c}{3a - b}\right]$
i.e. $\;$ $\left(3a - b\right)y - 7a - c = \dfrac{-1}{2} \left[\left(3a - b\right)x + 7b + 3c\right]$
i.e. $\;$ $\left(3a - b\right)x + \left(6a - 2b\right)y - 14a + 7b + c = 0$ $\;\;\; \cdots \; (5)$
Given: Orthocenter of the triangle is $\;$ $O \left(2, 1\right)$.
$\therefore \;$ Point $O$ satisfies both equations $(4)$ and $(5)$.
Substituting $\left(x, y\right) = \left(2,1\right)$ in equation $(4)$ gives,
$2b - a + 2a - b = 0$
i.e. $\;$ $a + b = 0$ $\implies$ $a = -b$ $\;\;\; \cdots \; (6)$
Substituting $\left(x, y\right) = \left(2,1\right)$ in equation $(5)$ gives,
$2 \left(3a - b\right) + 6a - 2b - 14a + 7b + c = 0$
i.e. $\;$ $6a - 2b + 6a - 2b - 14a + 7b + c = 0$
i.e. $\;$ $-2a + 3b + c = 0$ $\;\;\; \cdots \; (7)$
In view of equation $(6)$, equation $(7)$ becomes
$2b + 3b + c = 0$ $\implies$ $c = -5b$ $\;\;\; \cdots \; (8)$
$\therefore \;$ In view of equations $(6)$ and $(8)$ equation $(3)$ becomes,
$-bx + by -5b = 0$
$\therefore \;$ The equation of the third side of the triangle is
$x - y + 5 = 0$