Question
A bag contains red, green, and yellow balls of equal sizes. If one ball is chosen out of the box at random, then the probability of a red ball being taken out is 12 and that of a yellow ball being taken out is 13. If 3 yellow balls and 1 green ball are added to the bag, then the probability of a randomly chosen ball being yellow will become 38. Find the total number of balls.