<s>[INST] find the values of the real numbers A and B such that... 


i expanded and simplified the RHS to $x^4+Bx^3+4x^2+Ax^3+ABx^2+2Ax+2Bx+4$
i don’t know where to go from here. 
 [/INST] After your expansion
$$x^4+Bx^3+2x^2+Ax^3+ABx^2+2Ax+2x^2+2Bx+4$$
Just like how you grouped the $2x^2+2x^2$, we can group like terms (same $x^i$)
$$x^4+(A+B)x^3+(AB+4)x^2+(2A+2B)x+4\equiv x^4+4$$
Now since this is true for all $x$, all the matching coefficients must be equal! (Might not be obvious)
$$x^4+(A+B)x^3+(AB+4)x^2+(2A+2B)x+4\equiv x^4+0x^3+0x^2+0x+4$$
$$A+B=0,AB+4=0,2A+2B=0$$
$$\implies A=-B,AB+4=0$$
$$\implies -B^2+4=0$$
$$A,B=2,-2$$
$$\therefore x^4+4=(x^2+2x+2)(x^2-2x+2)$$
</s>