Find polynomials $M_1(x)$ and $M_2(x)$ such that $(x+1)^2M_1(x) + (x^2 + x + 1)M_2(x) = 1$ I have been trying to solve this with no success. Could you suggest me a solution?

Back to the basics! Remember how you do it for integers? For example, how would you find $x$, $y$ such that $23x+47y=1$? That's right, Euclid's algorithm.
Let's try to calculate the GCD of $(x+1)^2$ and $x^2+x+1$.
$$
(x+1)^2 - (x^2+x+1) = x\\
(x^2+x+1) - x(x+1) = 1
$$
Hence,
$$(x^2+x+1) - ((x+1)^2 - (x^2+x+1))(x+1) = 1$$
Therefore,
$$- (x+1)(x+1)^2 + (x+2)(x^2+x+1) = 1$$
