Hello, jarny!
A right triangle is formed in the first quadrant by the x and y axes
and a line through the point (1,2).
a) Write the length L of the hypotenuse as a function of x.
Code:

(0,b)*
 *
 * (1,2)
 o
 *
 *
  +      *  
 (a,0)
The line with intercepts $\displaystyle (a,0),\0,b)$ has the equation: .$\displaystyle \frac{x}{a} + \frac{y}{b} \:=\:1$
Since $\displaystyle (1,\,2)$ is on this line: .$\displaystyle \frac{1}{a} + \frac{2}{b} \:=\:1\quad\Rightarrow\quad b \:=\:\frac{2a}{a1}\;\;{\color{blue}[1]}$
The length of the hypotenuse is given by: .$\displaystyle L^2 \:=\:a^2+b^2\;\;{\color{blue}[2]}$
Substitute [1] into [2]: .$\displaystyle L^2 \;=\;a^2 + \left(\frac{2a}{a1}\right)^2 \;=\;\frac{a^4  2a^3 + 5a^2}{(a1)^2} $
Therefore: .$\displaystyle L \;=\;\frac{\sqrt{x^42x^2 + 5x^2}}{x1} $