2. Calculate the value of the expression $\frac{a^{2}}{a b+b^{2}}$ if the ratio of the numbers $a$ and $b$ is $2: 5$.
First method:

The ratio $a: b=2: 5$ can be written in the form $\frac{a}{b}=\frac{2}{5}$.

If we divide the numerator and the denominator of the given expression by $b^{2}$ and substitute $\frac{a}{b}=\frac{2}{5}$, we get

$$
\begin{aligned}
\frac{a^{2}}{a b+b^{2}} & =\frac{\frac{a^{2}}{b^{2}}}{\frac{a b}{b^{2}}+\frac{b^{2}}{b^{2}}}=\frac{\left(\frac{a}{b}\right)^{2}}{\frac{a}{b}+1}= \\
& =\frac{\left(\frac{2}{5}\right)^{2}}{\frac{2}{5}+1}=\frac{\frac{4}{25}}{\frac{7}{5}}= \\
& =\frac{4 \cdot 5}{25 \cdot 7}=\frac{4}{35}
\end{aligned}
$$