Ratio of red to blue is 8:7 . . . but she has 24 red pens . . . not 7, so the ratio leaves us to figure out how many blue pens . . . x . . . at a ratio of 24:x . . . we know that whether she has 24 or 7 or any number of red pens, we know the ratio will always be the same . . . so 24/x = 8/7 . . . solve by multiplying x to both sides and then multiplying both sides by 7/8/. . . 24*7/8 . . . x = 21 blue pens. 21 + 24 = 45 pens total.