The system m+2m and other block m are connected by same string and also in the system m+2m m is stationary with respect to 2m implies acceleration of all the blocks are same.
Let the accelaration of m be 'a' downwards and that of m+2m be 'a' rightwards.
Writing force equation for m : mg - T = ma.....(1)
Writing force equation for m+2m : T = (m+2m)a........(2)
From (1) and (2) : a = g/4
Now consider system m+2m : block m moves with accelaration g/4 but friction with block 2m is keeping it stationary with respect to 2m and the magnitude of frictional force = ma = mg/4