(3x^2-2x-1)-(5x^2-4x-2)

Remove the first set of parentheses with no change of the contents.

Remove the second set of parentheses but change the sign of each term in the parentheses, since the parentheses are preceded by a negative sign.

(3x^2-2x-1)-(5x^2-4x-2)
=3x^2-2x-1-5x^2+4x+2

Now group like terms and add/subtract
=-2x²+2x+1