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}+$ $8 f(x)$, if the minimum value of the function $(f(x))^{2}+8 g(x)$ is -29.
Answer: -3.

Solution. Let $f(x)=a x+b, g(x)=a x+c$, where $a \neq 0$. Consider $h(x)=(f(x))^{2}+8 g(x)$. Expanding the brackets, we get $h(x)=(a x+b)^{2}+8(a x+c)=a^{2} x^{2}+2 a(b+4) x+b^{2}+8 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_{\text {v }}=-\frac{b+4}{a}$; the y-coordinate of the vertex is $h\left(x_{\text {v }}\right)=-8 b-16+8 c$.

Similarly, we find that the minimum value of the expression $(g(x))^{2}+2 f(x)$ is $-8 c-16+8 b$. Note that the sum of these two minimum values is -32, therefore, if one of these minimum values is -29, then the other is $-32+29=-3$.