$3{x}^{2}-\left( {x}^{2}+1-x \times \left( x-2x+1 \right) \right)+2$
Collect like terms$3{x}^{2}-\left( {x}^{2}+1-x \times \left( -x+1 \right) \right)+2$
Distribute $-x$ through the parentheses$3{x}^{2}-\left( {x}^{2}+1+{x}^{2}-x \right)+2$
Collect like terms$3{x}^{2}-\left( 2{x}^{2}+1-x \right)+2$
When there is a $-$ in front of an expression in parentheses, change the sign of each term of the expression and remove the parentheses$3{x}^{2}-2{x}^{2}-1+x+2$
Collect like terms${x}^{2}-1+x+2$
Calculate the sum${x}^{2}+1+x$
Use the commutative property to reorder the terms${x}^{2}+x+1$