A common tangent to two curves is a line that is tangent to the two curves, but not necessarily at the same point.
Find, in terms of $a$ and $b$, the explicit equation of the common tangent to the two curves $y = x^2 + ax + b$ and $y = x^2 + bx + a$, where $a$ is not equal to $b$.
Also find, in terms of $a$ and $b$, the $x$ coordinates of the points of contact of this common tangent with each of the two curves.

$$y_1=x_1^2+ax_1+b \tag{1}$$
$$y_2=x_2^2+bx_2+a \tag{2}$$
Equating the slope of the common tangent:
$$m=2x_1+a=2x_2+b$$
$$x_1=\frac{m-a}{2} \tag{3}$$
$$x_2=\frac{m-b}{2} \tag{4}$$
Now \begin{align} m &= \frac{y_1-y_2}{x_1-x_2} \\ &= \frac{x_1^2+ax_1+b-x_2^2-bx_2-a}{x_1-x_2} \\ &= \frac{(m-a)^2+2a(m-a)+4b-(m-b)^2-2b(m-b)-4a}{2(m-a)-2(m-b)} \\ &= \frac{m^2-a^2+4b+b^2-m^2-4a}{2(b-a)} \\ &= \frac{b^2-a^2+4(b-a)}{2(b-a)} \\ &= \frac{a+b}{2}+2 \end{align}