2. Given two linear functions $f(x)$ and $g(x)$ such that the graphs $y=f(x)$ and $y=g(x)$ are parallel lines, not parallel to the coordinate axes. Find the minimum value of the function $(g(x))^{2}+$ $f(x)$, if the minimum value of the function $(f(x))^{2}+g(x)$ is -6.
# Answer: $\frac{11}{2}$.

Solution. Let $f(x)=a x+b, g(x)=a x+c$, where $a \neq 0$. Consider $h(x)=(f(x))^{2}+g(x)$. Expanding the brackets, we get $h(x)=(a x+b)^{2}+(a x+c)=a^{2} x^{2}+a(2 b+1) x+b^{2}+c$. The graph of $y=h(x)$ is a parabola opening upwards, and the minimum value is attained at the vertex. The x-coordinate of the vertex is $x_{\mathrm{B}}=-\frac{2 b+1}{2 a}$; the y-coordinate of the vertex is $h\left(x_{\mathrm{B}}\right)=-b-\frac{1}{4}+c$.

Similarly, we obtain that the minimum value of the expression $(g(x))^{2}+f(x)$ is $-c-\frac{1}{4}+b$. Note that the sum of these two minimum values is $-\frac{1}{2}$, therefore, if one of these minimum values is -6, then the other is $-\frac{1}{2}+6=\frac{11}{2}$.