Answer
$~\theta = tan^{-1}(\frac{x}{x^2+2})$
Work Step by Step
Let $~A~$ be the angle from the horizontal to the top of the painting.
Let $~B~$ be the angle from the horizontal to the bottom of the painting.
Then $\theta = A-B$. We can find an expression for $tan~\theta$:
$tan~\theta = tan(A-B)$
$tan~\theta = \frac{tan~A-tan~B}{1+tan~A~tan~B}$
$tan~\theta = \frac{\frac{2}{x}-\frac{1}{x}}{1+(\frac{2}{x})(\frac{1}{x})}$
$tan~\theta = \frac{\frac{1}{x}}{1+\frac{2}{x^2}}$
$tan~\theta = \frac{\frac{1}{x}}{\frac{x^2+2}{x^2}}$
$tan~\theta = \frac{x^2}{(x)(x^2+2)}$
$tan~\theta = \frac{x}{x^2+2}$
Therefore, $~\theta = tan^{-1}(\frac{x}{x^2+2})$