The total number of states is 48. We were told that the ratio of states that border an ocean to states that do not border an ocean is 7:9. The total ratio is
7 + 9 = 16
To find how many states out of the 48 border an ocean, we would express the ratio of the number of states that border an ocean with respect to the total ratio and multiply by the total number of states. Thus, the number of states that border an ocean is
7/16 * 48
= 21
Thus, 21 states border an ocean