<s>[INST] If $a,b$ are roots for $x^2+3x+1=0$.Calculating $(\frac{a}{b+1})^2 +(\frac{b}{a+1})^2$ If $a,b$ are roots for the equation $x^2+3x+1=0$.How to calculate $$\left(\frac{a}{b+1}\right)^2 +\left(\frac{b}{a+1}\right)^2$$
 [/INST] Hint: $(a+1)^2 + a = 0$ and so $\frac{1}{(a+1)^2} = -\frac{1}{a}$
</s>