We can set up a proportion since we know the ratio between the # of purple marbles and the # of green marbles.
A ratio is a way to compare two different values: for every 8 purple marbles there are 5 green marbles

when we cross multiply, we get 5p = 240
we divide both sides by 5 to isolate the variable
There are 48 purple marbles