Hi Faith,
W= no of white
B= no of blue
P= no of purple marbles
We know that W+B+P=50 the bag contains 50 marbles
We also know that W=18 and B=16 so W+P=24 so P=50-34=16
So the ratio of W to P =18/16=9/8
Hope this helps
Jim