The decomposition $u+w, \enspace u\in U,\enspace w\in W$, of an element of $U+W$ is unique if $U\cap W=0$.
Indeed, if $u+w=u'+w'$, then $u'-u =w-w'\in U\cap W=0$. Thus $u'-u=w-w'=0$, which implies $u'=u$, $w'=w$.
There results that any two vectors $u\in U, w\in W$ are linearly independent, hence, if $\lambda_1 u_1+\lambda_2 u_2+\mu_1 w_1+\mu_2 w_2+\mu_3 w_3=0$ is any relation between $u_1, u_2, w_1, w_2, w_3$,then
$$\lambda_1 u_1+\lambda_2 u_2=0,\quad \mu_1 w_1+\mu_2 w_2+\mu_3 w_3=0,$$
whence $\lambda_1=0,\lambda_2=0$ on one hand, $\;\mu_1=0, \mu_2=0, \mu_3=0$ on the other hand. This proves these five vectors are linear independent. As they're obviously a system of generators of $U\oplus W$, they constitute a basis for this direct sum.