$(I-A)(A^2+A+I) = (A^2+A+I-A^3-A^2-A) = (-A^3 + (A^2 - A^2) + (A-A) + I) = I$
Based on your question, I am assuming the problem you were given just to show that $I-A$ is the inverse of $A^2+A+I$, and not something like "Find the inverse of $I-A$", which would require you to first use logic to deduce that $A^2+A+I$ is a reasonable formula for the inverse. (Note, I am writing $I$ as short for $I_{50}$ since there is no ambiguity on which identity I am using).
So the inverse of a matrix $T$, is the matrix $T^{-1}$ such that $TT^{-1} = I$. We do not have to worry about right or left inverses, since $I$ and $A$ are square, thus any sums and products of these matrices are square, and it is a common result for square matrices that $AB = I$ implies $BA = I$. If you do not know this yet, you could multiply $(I-A)$ on the left by $(A^2+A+I)$ and deduce the result very similarly.
So all I did was multiply the two together and I got the identity, so they must be inverses. The first equality uses the distributive property, the second commutativity and associativity of matrix addition, the third uses the assumption that $A^3 = 0$ and the properties of additive inverses and the additive identity (the zero matrix) to deduce that the product is $I$.