Let $V$ be a finite dimensional vector $\mathbb{C}$-space with inner product. Consider two subspaces $U_{1}$ and $U_{2}$ of $V$. Define $W=\left \{ u_1 +u_{2}:u_{1} \in U_{1}, u_{2} \in U_{2}\right \}$. Prove $U_{1} \subseteq U_{2}^{\perp}$ if and only if $P_{W}=P_{U_{1}}+P_{U_{2}}$.
$\bullet \Rightarrow$ Let $U_{1} \subseteq U_{2}^{\perp}$. Then $\left \langle u_{1},u_{2} \right \rangle=0$ and $U_{1}$ and $U_{2}$ are orthogonal. This implies there exists an orthonormal basis of $U_{1}$ that can be extended to an orthonormal basis of $U_{1} \cup U_{2}$ and then of $V$. Let $x \in V$. $x=\sum_{i=1}^{k}c_{i}u_{i}+\sum_{i=k+1}^{m}c_{i}u_{i}+\sum_{i=m+1}^{n}c_{i}u_{i}$ and $P_{W}x=\sum_{i=1}^{k}c_{i}u_{i}+\sum_{i=k+1}^{m}c_{i}u_{i}=P_{U_{1}}x+P_{U_{2}}x$.
Therefore, $P_{W}=P_{U_{1}}+P_{U_{2}}$.
$\bullet \Leftarrow$ Let $P_{W}=P_{U_{1}}+P_{U_{2}}$ and $x \in U_{1}$. $P_{W}x=P_{U_{1}}x+P_{U_{2}}x\implies x=x+P_{U_{2}}x\implies P_{U_{2}}x=0\implies x\in U_{2}^{\perp}$.
Therefore, $U_{1} \subseteq U_{2}^{\perp}$.
$\bullet\therefore$ $U_{1} \subseteq U_{2}^{\perp}$ if and only if $P_{W}=P_{U_{1}}+P_{U_{2}}$.
Sure, your solution pretty much makes sense. One problem is that where you write "a basis of $U_1 \cup U_2$", since $U_1 \cup U_2$ isn't a vector subspace of $V$. Of course you probably should write $W (= \operatorname{span}(U_1 \cup U_2))$ instead, but there is still a subtlety that you'd like the vectors $\{u_i\}_{i = k + 1}^m$ to all lie in $U_2$. I would suggest finding orthonormal bases of $U_1$ and $U_2$ first instead, and then combining them.
Perhaps also be careful omitting quantifiers where you shouldn't in some places, e.g. when you say "Then $\left \langle u_{1},u_{2} \right \rangle=0$...", you should really include something like "Then for all $u_1 \in U_1$ and $u_2 \in U_2$ we have $\left \langle u_{1},u_{2} \right \rangle=0$...". Also, since the condition "$U_{1} \subseteq U_{2}^{\perp}$" is a property, probably you would usually say "Suppose that $U_{1} \subseteq U_{2}^{\perp}$" and not "Let $U_{1} \subseteq U_{2}^{\perp}$". But of course this is a minor point.
Otherwise, given the characterization of orthogonal projections which you use in the middle there (namely that you can compute $P_U$ for any subspace $U \subseteq V$ in the way you describe, by starting with an orthonormal basis for $U$ and then extending this to an orthonormal basis for all of $V$), it sounds good to me.