There's a rule to memorize that, when you divide by fractions, you flip the fraction and multiply. It would be a good idea to memorize that, but, you don't even have to think of it that way. After all, division is just the inverse of multiplication, so we can think of it in terms of multiplication.
You know that [tex]S = r \frac{\pi}{4}.[/tex]
Except, you want to know what [itex]r[/itex] is in terms of [itex]S[/itex], which means you have to get [itex]r[/itex] alone on one side. So instead of thinking of it as dividing by [itex]\frac{\pi}{4}[/itex], think of it as multiplying both sides by the inverse.
So what's the inverse of a number, you might ask? The inverse of a number [itex]a[/itex] is the number [itex]b[/itex] such that [itex]a b = 1[/itex]. We usually denote [itex]b[/itex] as [itex]a^{-1}[/itex] or [itex]\frac{1}{a}[/itex].
So what's the inverse of [itex]\frac{\pi}{4}[/itex]? Well, we just look at what number we can multiply with it to get [itex]1[/itex]. Just by looking at it, we see that the inverse of [itex]\frac{\pi}{4}[/itex] is [itex]\frac{4}{\pi}[/itex], because [itex]\frac{\pi}{4} \frac{4}{\pi} = \frac{4 \pi}{4 \pi} = 1[/itex]. So, if we simply multiply this inverse by both sides, then it'll deal with that term and we'll get [itex]r[/itex] by itself: [tex]S = r \frac{\pi}{4} \implies \frac{4}{\pi} S = r \frac{\pi}{4} \frac{4}{\pi} \implies \frac{4S}{\pi} = r.[/tex]
So that's really what's going on when you perform that operation. Now, the easy way to do all that is to just know that [tex]\frac{\frac{a}{b}}{\frac{c}{d}} = \frac{a}{b} \frac{d}{c}[/tex]