Let m = number of men.
Let w = number of women.
The statement says that women and men get both a haircut and shampoo.
Income = number of men*(price of haircut and price shampoo) + number of women*(price of haircut and price of shampoo)
Or
m($15 + $7) + w($45 + $12)
Which leads to:
22m + 57w
Hope this helps!