ok, by the way you have defined S, S is a basis for U. similarly, T is a basis for V. and we need to prove that SUT is a basis for U+V in W.
it is easy to see that span{SUT} = U+V. if u+v is any arbitrary vector in U+V, then:
u is in the span of S, and v is in the span of T, so
u = a1s1 + a2s2 +....amsm, v = b1t1 + b2t2 +...+bntn
where m = dim U = |S|, n = dim V = |T|.
thus u+v = a1s1 + a2s2 +...+ amsm + b1t1 + b2t2 + ...+ bntn
so U+V is contained in span{SUT}. but if w is in span{SUT}, then
w = c1s1 + c2s2 +....+ cmsm + c(m+1)t1 + c(m+2)t2 +....+ c(m+n)tn
and c1s1 + c2s2 +....+ cmsm is in U, c(m+1)t1 + c(m+2)t2 +....+ c(m+n)tn is in V,
so w is in U+V. hence span{SUT} = U+V.
suppose now that:
c1s1 + c2s2 +....+ cmsm + c(m+1)t1 + c(m+2)t2 +....+ c(m+n)tn = 0
this is of the form u + v for c1s1 + c2s2 +....+ cmsm in U, and
c(m+1)t1 + c(m+2)t2 +....+ c(m+n)tn in V, and so is in U+V.
but u + v = 0 implies v = -u, which implies v is in U, so v is in U∩V, so v = 0.
this, in turn implies u = 0. hence:
c1s1 + c2s2 +....+ cmsm = 0 and c(m+1)t1 + c(m+2)t2 +....+ c(m+n)tn = 0
by the linear independence of S, c1 = c2 = ...=cm = 0.
by the linear independence of T c(m+1) = c(m=2) = ....c(m+n) = 0,
so {SUT} is linearly independent in W, and thus forms a basis for the subspace U+V.