Let $f: \mathbb{R}^3 \rightarrow \mathbb{R}^3$ such that $$(x,y,z) \mapsto (y+z,x-z,-x+y+2z) $$ Find its matrix, then show that this function is a projection parallel to a vector subspace $G$ onto a vector subspace $F$. Find the basis $B_F$ for $F$ and the basis $B_G$ for $G$ and then find the matrix of $f$ in the basis $B= B_F \cup B_G$.
So the matrix $A$ of $f$ looks as follows: $$ \begin{bmatrix} 0 & 1 &1 \\ 1 & 0 & -1\\ -1 & 1 & 2 \end{bmatrix} $$ To show that it's a projection, I simply notice that $A^2 =A$. Now, I know that the $F,G$ vector subspaces are equal to $F= \text{Im(f)}$ and $G= \text{Ker(f)}$.
Now to find the basis for $\text{Ker(P)}$ I simply have to solve the equation $AX= 0$, which gives me the following results: $A (x,y,z)^T =0 \iff x=z,y=-z,z=z$. So a basis for $\text{Ker(f)}$ would be: $(1,0,1),(0,-1,1)$ and as it is identical to the first two columns of $A$, I can simply choose the basis of $\text{Im(p)}$ as the last column (am I right? I am unsure about this).
Now the hard part comes, finding the matrix of $A$ in the new basis. The new basis is : $(1,0,1),(0,1,-1),(1,-1,2)$. So if we call the vectors of the new basis this way: $\epsilon_1 =(1,0,1), \epsilon_2 = (0,1,-1), \epsilon_3 =(1,-1,2) $ we have that
$$\epsilon_1= 1e_1 + 1e_3$$ $$ \epsilon_2=1e_2 -1e_3 $$ $$\epsilon_3= 1e_1 -1e_2 + 2e_3 $$ So the matrix $P$ for the change of basis is equal to: $$\begin{bmatrix} 1 & 0 &1 \\ 0 & 1 & -1\\ 1 & -1 & 2 \end{bmatrix} $$
So the matrix of $f$ in the new basis would be $P^{-1}AP$, is this correct?
$P$ is the matrix of the identity linear transformation
$$I: \mathbb{R}^3 \to \mathbb{R}^3$$
In other words, suposse the canonical base $\{ e_1, e_2, e_3\}$ and $\{ \epsilon_1, \epsilon_2, \epsilon_3\}$ the new base. Then, $P(e_1)= \epsilon_1$, $P(e_2) = \epsilon_2$ and $P(e_3) = \epsilon_3$.
So to use $P$, you have to use a vector $v$ in the canonical base and its output is the same vector in the other base. In other wise, $P^{-1}$ take a vector in the new base and its output is the same vector in the canonical base. Remark that $A$ take vector $v$ in the canonical base and the output $Av$ is too in the canonical base . So to find the matrix of $f$ in the new base, you have to do $$PAP^{-1}$$
UPDATE
I made a mistake
In fact, the matrix $P$ can be considered as the identity transformation matrix that carries vectors on the noncanonical basis in the canonical base. As you wrote above
$$\epsilon_1 = (1,0,1); \epsilon_2 = (0,1,-1); \epsilon_3 = (1,-1,2)$$
where $(1,0,1),(0,1,-1),(1,-1,2)$ are vector on canonical basis. So, to use $P$, you have to use a vector on the noncanonical basis and its output is the same vector in the canonical base. So
$$P^{-1} A P$$
is your target.