Let $x_1$ and $x_2$ be the roots of the equation $x^2 + 3x + 1 = 0$. Compute 
\[
\left(\frac{x_1}{x_2 + 1}\right)^2 + \left(\frac{x_2}{x_1 + 1}\right)^2
\]

Let's think step by step and output the final answer within \boxed{}.
user