Let $P$ be a plane passing through the origin.  When $\begin{pmatrix} 5 \\ 3 \\ 5 \end{pmatrix}$ is projected onto plane $P,$ the result is $\begin{pmatrix} 3 \\ 5 \\ 1 \end{pmatrix}.$  When $\begin{pmatrix} 4 \\ 0 \\ 7 \end{pmatrix}$ is projected onto plane $P,$ what is the result?
First, we need to find the normal vector to the plane $P$. We know that $\begin{pmatrix} 5 \\ 3 \\ 5 \end{pmatrix}$ is on the plane, and that its projection onto the plane is $\begin{pmatrix} 3 \\ 5 \\ 1 \end{pmatrix}.$ This means that the vector $\begin{pmatrix} 5 \\ 3 \\ 5 \end{pmatrix} - \begin{pmatrix} 3 \\ 5 \\ 1 \end{pmatrix} = \begin{pmatrix} 2 \\ -2 \\ 4 \end{pmatrix}$ is normal to the plane. That's correct. Now we can find the projection of $\begin{pmatrix} 4 \\ 0 \\ 7 \end{pmatrix}$ onto the plane. The projection is just $\begin{pmatrix} 4 \\ 0 \\ 7 \end{pmatrix} - \operatorname{proj}_{\begin{pmatrix} 2 \\ -2 \\ 4 \end{pmatrix}} \begin{pmatrix} 4 \\ 0 \\ 7 \end{pmatrix}$. Now we just need to compute this expression. The dot product in the denominator is $4 + 4 + 16 = 24.$ And the dot product of $\begin{pmatrix} 2 \\ -2 \\ 4 \end{pmatrix}$ and itself is $4 + 4 + 16 = 24$. So the projection we want to find is $\begin{pmatrix} 4 \\ 0 \\ 7 \end{pmatrix} - \frac{36}{24} \begin{pmatrix} 2 \\ -2 \\ 4 \end{pmatrix}$. Finally, this expression is $\begin{pmatrix} 4 \\ 0 \\ 7 \end{pmatrix} - \begin{pmatrix} 3 \\ -3 \\ 6 \end{pmatrix} = \begin{pmatrix} 1 \\ 3 \\ 1 \end{pmatrix}$. So the answer is $\begin{pmatrix} 1 \\ 3 \\ 1 \end{pmatrix}.$

