For the first statement, you know that the total of the red and blue cars was 30. So in math terms you can say $r+b=30$. The second one is trickier. How can you write "after selling 2 red cars and no blue cars, the dealer had 3 times as many red cars as blue cars" into an equation?