First, we'll notice that the expression which has to be calculated has as common factor the expression A.
E= A* (B-1)
Now, we'll put the values of the expressions A and B into the expression E.
E= (x^2+2x-2)*( x^2-2x-4-1)
E=x^2*( x^2-2x-5) +2x*( x^2-2x-5) -2*( x^2-2x-5)
We'll group the terms which have the same power of the variable.
E= x^4 + (-2x^3+2x^3)+( -5x^2-4x^2-2x^2)+( -10x+4x) +10
E= x^4 +0 -11x^2-6x+10