Express $\frac {a^2+(a+b)^2}{a(a+b)}$ in terms of $x$ and $y$. Given that ${ab}=x$ and ${a+b}=y$.  Express $\dfrac{a^2+(a+b)^2}{a(a+b)}$ in terms of $x$ and $y$.
I try many way still cannot succeed.  Please use some elementary way to help me to solve this.  As I am not familiar with MathJax, so if exists any mistake please forgive me.  Thanks.
 A: As suggested in the comments, $a$ and $b$ are the roots of $t^2-yt+x=0$. We get this from: $$a=\frac xb\implies\frac xb+b=y\implies b^2-yb+x=0$$ and similarly for $a$ leads to the same equation. 
Solving this gives $$t=\frac{y\pm\sqrt{y^2-4x}}{2}$$
Wlog, let $a$ be the root with the $+$ sign and $b$ be the root with the $-$ sign. Then $$\frac ya=\frac{2y}{y+\sqrt{y^2-4x}}=\frac{2}{1+\sqrt{1-4\frac {x}{y^2}}}$$

$$\frac {a^2+(a+b)^2}{a(a+b)}=\frac{a^2+y^2}{ay}=\frac ay+\frac ya=\frac{1+\sqrt{1-4x/y^2}}{2}+\frac{2}{1+\sqrt{1-4x/y^2}}$$
This can be simplified to $$\frac{4y^2+4x-(3y^2-4x)\sqrt{1-4x/y^2}}{8x}$$
(I think - that $3$ looks suspicious so this could be worth checking).
A: This is the same approach as John Doe's but the result is a little different. The numerator is a bit simpler but the denominator more complex since it features a square root.
Define the square root $s$ of $y²-4x$ by
\begin{align}s²=y²-4x\end{align}
Then let $a$ be the root with the $+$ sign and $b$ be the root with the $-$ sign.
\begin{align}a=\dfrac{y+s}{2}\\b=\dfrac{y-s}{2}\\\end{align}
Inserting and expanding yields
$$\dfrac{a^2+(a+b)^2}{a(a+b)}=\dfrac{s²+2sy+5y²}{2y(s+y)}$$
A: This might help.
Put $a=\lambda b$, i.e. $\lambda=\dfrac ab$.
This gives $\lambda b^2=x$ and $(1+\lambda)b=y$. 
Also, 
$$\frac {a^2+(a+b)^2}{a(a+b)}=\frac{\frac {a^2}{b^2}+(\frac ab+1)^2}{\frac ab(\frac ab+1)}=\frac{\lambda^2+(\lambda+1)^2}{\lambda(1+\lambda)}=\frac {\lambda}{1+\lambda}+\frac{1+\lambda}{\lambda}$$
