A^X+A^Y=4
A^(X+Y)=2
1.
A^2X+A^2Y
=(A^X+A^Y)^2-2A^XA^Y
=4^2-2A^(X+Y)
=16-2*2
=16-4
=12
2.
A^3X+A^3Y
=(A^X+A^Y)(A^2X-A^X*A^Y+A^2Y)
=4[(A^2X+A^2Y)-A^(X+Y)]
=4(12-2)
=4*10
=40
X^4+2X+1
=X^4-2X^2+1+2X^2+2X
=(X^2-1)^2+2X(X+1)
=(X+1)^2(X-1)^2+2X(X+1)
=(X+1)[(X+1)(X-1)^2+2X]
=(X+1)[(X+1)(X^2-2X+1)+2X]
=(X+1)(X^3-2X^2+X+X^2-2X+1+2X)
=(X+1)(X^3-X^2+X+1)