Mike had 1/6 as many marshmallows as Julian. When Julian gave half of his marshmallows to Mike, he then had 9 fewer marshmallows than his friend. How many marshmallows did Julian have at first?

M = 1/6 J or J = 6M

and

M + 1/2J = 1/2J + 9

M = 9 then J = 6M = 54