22. Quadratic trinomials $f(x)$ and $g(x)$ are such that

\[
\begin{aligned}
& f(2) \\
& g(2)
\end{aligned}=\begin{aligned}
& f(3) \\
& g(3)
\end{aligned}=2
\]

Find $f(1)$, given that $g(1)=2, f(5)=7$ and $g(5)=2$.

(A. Golev)
22. Answer: $f(1)=5$.

Consider the quadratic trinomial $h(x)=2 g(x)-f(x)$. The conditions state that the numbers 2 and 3 are roots of this quadratic trinomial. Therefore,

$$
2 g(x)-f(x)=a(x-2)(x-3)
$$

where $a$ is the leading coefficient of this trinomial.

Now substitute $x=5$ into this equation and we find that

$$
2 \cdot 2-7=2 g(5)-f(5)=a(5-2)(5-3)=6 a
$$

from which $a=-\frac{1}{2}$. Now, substituting $x=1$ into the same equation, we find

$$
2 \cdot 2-f(1)=-\frac{1}{2}(1-2)(1-3)=-1
$$

from which $f(1)=5$.