There were some marbles at a shop. The ratio of the number of red marbles to the number of blue marbles was 2:3. When 50 more red marbles and 30 more blue marbles were added, the ratio of the number of red marbles to the number of blue marbles became 5:6. How many marbles were there at first?

Ref: http://www.kiasuparents.com/kiasu/forum/viewtopic.php?p=1790#p1790