<s>[INST] Using 3 equations, find $2a-b+c$. From the problem, I extract the following 3 equations.


*

*$a+b+c=10$

*$ab+bc+ca=31$

*$abc=30$


The question is to find $(2a-b+c)$.

Using the equation $(a+b+c)^2 = a^2 + b^2 + c^2 +2 (ab+bc+ca)$, I found $a^2+b^2+c^2=38$.
Using the equation $a^3+b^3+c^3 - 3abc = (a+b+c)(a^2 + b^2+c^2-ab-bc-ca)$, I found $a^3+b^3+c^3=160$.
However, I was stuck here. Please let me know some directions. Thank you.
 [/INST] the first equation gives:
$$a+b=10-c$$
the second one:
$$c(a+b)=31-ab$$ with the first
$$c(10-c)=31-ab$$ and with $$c=\frac{30}{ab}$$ we obtain
$$c(10-c)=31-\frac{30}{c}$$
can you proceed?
</s>