If the mass of large clay is x, the mass of small clay is 30-X.
By the lever originally has:
L 1*X=27*L2 ……①
L 1*(30-X)=8*L2 ……②
L 1/L2=27/X comes from ①.
Substituting ② into (30-X)*27/X=8, we get X= 162/7.
So the mass of the big ball is 162/7g, and the mass of the small ball is 30- 162/7 = 48/7g.