Show that if $(A+2I)^2=0$, then $A+\lambda I$ is invertible for $\lambda \ne 2$.
I tried to solve this by treating $(A+\lambda I)v=0$ as linear equation system, and proving that $v$ must be $0$ (trivial solution) therefore $A+\lambda I$ echelon form is I and it's invertible..
Would love to hear another solutions, and tips to my own proof:
$$A+\lambda I=A+2I+(\lambda-2) I.$$
$$(A+\lambda I)v=0 \Rightarrow (A+2I)v+(\lambda-2)Iv=0.$$
$$(A+2I)(A+2I)v+(A+2I)(\lambda-2)Iv=0 \Rightarrow (\lambda-2)(A+2I)Iv=0 \Rightarrow (A+2I)Iv=0$$ (multiply by $A+2I$ and we know $\lambda \ne 2$).
$$(A+2I)v+(\lambda-2)Iv=0 \wedge (A+2I)Iv=0\Rightarrow (λ−2)Iv=0 \Rightarrow v=0$$
Therefore if v is solution for $(A+\lambda I)v=0$ it must be 0.
(We have also shown that for $\lambda = 2$, $v$ can be $(A+2I)$ which shows $A+2I$ isn't invertible)
BTW If A is such that $(A+2I)^2=0$, prove that $A+I$ is invertible. solves the basic case for $\lambda = 1$
Below is a more general statement. I have provided three solutions to your question. The first two use the proposition, and the last one is as you requested.
Proof. For each $\mu\in \mathbb{K}$, let $V_\mu\in \mathbb{K}^n$ denote the kernel (i.e., the nullspace) of $A-\mu\,I$. If $A-\mu\,I$ is invertible, then for any $v\in V_\mu$, we have $(A-\mu\,I)\,v=0$ and so $$v=(A-\mu\,I)^{-1}(0)=0\,,$$ implying that $V_\mu=\{0\}$. Conversely, if $V_\mu=\{0\}$, then $A-\mu\,I$ is an injective linear map from $\mathbb{K}^n$ to itself. It is well known that any injective linear map on a finite-dimensional vector space is also surjective, whence bijective and so invertible. (This well known result is not true for infinite-dimensional vector spaces, by the way.) Therefore, $A-\mu\,I$ is invertible.
First Solution.
In your case, the only eigenvalue of $A$ is $-2$. Thus, $A-\mu\,I$ is invertible if and only if $\mu\neq -2$, which is equivalent to saying that $A+\lambda\, I$ is invertible if and only if $\lambda\neq 2$.
Second Solution.
We shall prove that $\ker(A+\lambda\,I)=\{0\}$ when $\lambda\neq 2$. Suppose $v\in \ker(A+\lambda\,I)$. Then, $(A+\lambda\,I)\,v=0$, so $Av=-\lambda\,v$ and $A^2v=A(Av)=A(-\lambda\,v)=-\lambda\,(Av)=-\lambda\,(-\lambda v)=\lambda^2\,v$. Since $(A+2\,I)^2=0$, we also have $(A+2\,I)^2\,v=0$. Therefore, $$\lambda^2\,v-4\,\lambda\,v+4\,v=A^2v+4\,Av\,+4\,v=0\,.$$ Ergo, $(\lambda-2)^2\,v=0$. Since $\lambda\neq 2$, $v=0$, which implies $\ker(A+\lambda \,I)=\{0\}$.
Third Solution.
Since $\lambda \neq 2$, we have $$\frac{(x+2)^2-(x+4-\lambda)(x+\lambda)}{(\lambda-2)^2}=1\,,$$ where $x$ is a dummy variable. Therefore, $$\frac{(A+2\,I)^2-\big(A+(4-\lambda)\,I\big)\,(A+\lambda \, I)}{(\lambda-2)^2}=I\,.$$ As $(A+2\,I)^2=0$, we get $$\left(-\frac{1}{(\lambda-2)^2}\,\big(A+(4-\lambda)\,I\big)\right)\,(A+\lambda\,I)=I\,.$$ Thence, $A+\lambda\,I$ is invertible and $$(A+\lambda\,I)^{-1}=-\frac{1}{(\lambda-2)^2}\,\big(A+(4-\lambda)\,I\big)\,.$$