Where am I going wrong in calculating the projection of a vector onto a subspace?

The column space of $A$, namely $U$, is the span of the vectors $\mathbf{a_1}:=(1,1,1)$ and $\mathbf{a_2}:=(1,2,3)$ in $\Bbb R ^3$, and for $\mathbf{b}:=(2,2,4)$ you want to calculate the orthogonal projection of $\mathbf{b}$ in $U$; this is done by $$ \operatorname{proj}_U \mathbf{b}=\langle \mathbf{b},\mathbf{e_1} \rangle \mathbf{e_1}+\langle \mathbf{b},\mathbf{e_2} \rangle \mathbf{e_2}\tag1 $$ where $\mathbf{e_1}$ and $\mathbf{e_2}$ is some orthonormal basis of $U$ and $\langle \mathbf{v},\mathbf{w} \rangle:=v_1w_1+v_2w_2+v_3 w_3$ is the Euclidean dot product in $\Bbb R ^3$, for $\mathbf{v}:=(v_1,v_2,v_3)$ and $\mathbf{w}:=(w_1,w_2,w_3)$ any vectors in $\Bbb R ^3$.

Then you only need to find an orthonormal basis of $U$; you can create one from $\mathbf{a_1}$ and $\mathbf{a_2}$ using the Gram-Schmidt procedure, that is $$ \mathbf{e_1}:=\frac{\mathbf{a_1}}{\|\mathbf{a_1}\|}\quad \text{ and }\quad \mathbf{e_2}:=\frac{\mathbf{a_2}-\langle \mathbf{a_2},\mathbf{e_1} \rangle \mathbf{e_1}}{\|\mathbf{a_2}-\langle \mathbf{a_2},\mathbf{e_1} \rangle \mathbf{e_1}\|}\tag2 $$ where $\|{\cdot}\|$ is the Euclidean norm in $\Bbb R ^3$, defined by $\|\mathbf{v}\|:=\sqrt{\langle \mathbf{v},\mathbf{v} \rangle}=\sqrt{v_1^2+v_2^2+v_3^2}$.

Your mistake is that you assumed that $$ \operatorname{proj}_U\mathbf{b}=\frac{\langle \mathbf{b},\mathbf{a_1} \rangle}{\|\mathbf{a_1}\|^2}\mathbf{a_1}+ \frac{\langle \mathbf{b},\mathbf{a_2} \rangle}{\|\mathbf{a_2}\|^2}\mathbf{a_2}\tag3 $$ however this is not true because $\mathbf{a_1}$ and $\mathbf{a_2}$ are not orthogonal.