Probability you run out of white balls first?
Think of the order you draw the balls out as a sequence, and consider the very last ball in that sequence - whichever colour it is will be the colour left in the bag when you reach the given stopping condition (i.e. if the last ball to be drawn would be white, then you must have drawn all the red balls already, and vice versa). Since we only care about what that last ball is, we can assign its colour first and then ignore the rest of the sequence, and that will be red with probability equal to $\frac{\# \mbox{ of red balls}}{\# \mbox{ of total balls}} = \frac{r}{w+r}$.