Problem 9.5. On the board, the graph of the function $y=x^{2}+a x+b$ is drawn. Yulia drew two lines parallel to the $O x$ axis on the same drawing. The first line intersects the graph at points $A$ and $B$, and the second line intersects the graph at points $C$ and $D$. Find the distance between the lines if it is known that $A B=5, C D=11$.

![](https://cdn.mathpix.com/cropped/2024_05_06_ce887724b4f1896529bag-4.jpg?height=418&width=561&top_left_y=271&top_left_x=446)
Answer: 24.

Solution. Let the first line have the equation $y=s$, and the second line have the equation $y=t$. Then the distance between the lines is $(t-s)$.

The length of segment $A B$ is equal to the absolute value of the difference of the roots of the equation $x^{2}+a x+b=s$. We can express the difference of the roots using the formula for solving the quadratic equation $x^{2}+a x+(b-s)=0$:

$$
\frac{-a+\sqrt{a^{2}-4(b-s)}}{2}-\frac{-a-\sqrt{a^{2}-4(b-s)}}{2}=\sqrt{a^{2}-4(b-s)}=5
$$

from which we derive

$$
a^{2}-4(b-s)=25
$$

Similarly, we obtain

$$
a^{2}-4(b-t)=121
$$

Subtract the first equation from the second and we get

$$
121-25=\left(a^{2}-4(b-t)\right)-\left(a^{2}-4(b-s)\right)=4(t-s)
$$

We have $4(t-s)=96$, that is, $t-s=24$.