The problem is to decompose the the two-spin states ##|s_1,m_2;s_2,m_2 \rangle=|s_1,m_1 \rangle \otimes |s_2,m_2 \rangle## into irreducible representations of the total-spin states ##|S,M \rangle##. For ##s_1=s_2=1/2## it's easy to guess them, but it's also a good example to derive them systematically. You can obviously start with the state with ##M=1##. This you can obviously only get when ##m_1=m_2=1/2##, i.e., you have
$$|S=1,M=1 \rangle=|1/2,1/2;1/2,1/2 \rangle.$$
Now you can apply the lowering operator ##\hat{S}_-=\hat{s}_{1-}+\hat{s}_{2-}##, which together with the normalization to 1 leads to
$$|S=1,M=0 \rangle = \sqrt{\frac{1}{2}} (|1/2,-1/2;1/2,1/2 \rangle + |1/2,1/2;1/2,-1/2 \rangle)$$
Applying the lowering operator once more you get
$$|S=1,M=-1 \rangle = |1/2,-1/2;1/2,-1/2 \rangle.$$
Now the spin space is 4-dimensional, and we have found three orthonormal basis vectors. Now we have just to find one more, which is
$$|S=0,M=0 \rangle = \sqrt{\frac{1}{2}} (|1/2,1/2;1/2,-1/2 \rangle-|1/2,-1/2;1/2,1/2 \rangle).$$