5 'parts' of the total company staff are men, and 8 'parts' are women.
That's 13 'parts' all together, comprising 364 people.
So each 'part' is 364/13 = 28 people.
Men = 5 'parts' = 5 x 28 = 140 men
Women = 8 'parts' = 8 x 28 = 224 women
Check:
140/224 = 70/112 = 35/56 = 5/8
140 + 224 = 364
yay !