The ratio number of beads in Box A to the number of beads in the Box B is 3:5. The ratio of the number of beads in Box A to the number of beads in Box B bacame 1:3 when 10 beads were transferred from Box a to Box. B. How many beads were there in Box A at first?

a/b = 3/5

(a-10)/(b+10) = 1/3

a = 30