A block of mass $m_1$ 2 kg is lying on table attached to string which is connected to another mass $m_2$ 1 kg which is overhanging the table. Find the coefficient of kinetic friction if the speed of $m_2$ is found to be 0.5 m/s after it has descended by 1m.
The solution in the example solves the problem using Work-Kinetic energy theorem, i.e Change in KE=Work done
$$ ( \frac12mv_1^2+\frac12mv_2^2)-0= \mathrm{(workdone\,by\,frictional force)+work\,done\,by\,weight}\\ (\frac12mv_1^2+\frac12mv_2^2)-0= -μN*S+m_2g*1\mathrm{m} $$ where S is displacement of $m_1$. My question is why are we considering work done by frictional force on $m_1$? why not tension on the $m_1$?