Mr Tan had a box of marbles. 2/3 of the marbles were blue and the rest were yellow. He gave his son 4/5 of the blue marbles and 3/4 of the yellow marbles. If he had 39 marbles left, how many marbles did he have at first?

X = total mrbles.

2x/3 Blue marbles.
x/3 yel. marbles.

X - 4/5(2x/3) - 3/4(x/3) = 39 Marbles.
X - 8x/15 - x/4 = 39.
Multiply both sides by 60:
60x - 32x - 15x = 2340.
60x - 47x = 2340.
13x = 2340.
X = 180 Marbles.