In (the partial) solution, why does it consider the Tension,T, for finding the friction force between m1 and the surface? The tension is only affecting m1 in the horizontal direction. From where, the vertical component is apperaing?
from ƩF = ma and the free body diagram - the frictional force also acts horizontally to oppose the tension force so you need it.
Ultimately, it will form the link between the two masses.