hi everyone,

Some of the balls in bag A are divided into two bags B and C. If five are put in bag B and a third of the remainder are put in bag C, twelve remain.

Find the number of balls originally in bag A.

first attempt was

$\displaystyle 5+\frac{x}{3}=12$

which is wrong, then

$\displaystyle 5+\frac{1}{3}(x-5)=12$

which is still wrong

the answer is 23. but can someone please show me. thanks