The r% of a quantity x is computed by dividing x in 100 parts, and considering r of such parts. So, the r% of the male is
[tex] 30\times\cfrac{r}{100} = 0.3 r [/tex]
and similarly, the r% of female is
[tex] 20\times\cfrac{r}{100} = 0.2 r [/tex]
The number of males decreased by this quantity, so now it is
[tex] 30 - 0.3r [/tex]
and the number of female increased by this quantity, so now it is
[tex] 20+0.2r [/tex]
we know that these two new counts are the same number, so we can build and solve the equality
[tex] 30 - 0.3r = 20+0.2r [/tex]
Subtract 20 and add 0.3r from both sides:
[tex] 10 = 0.5r [/tex]
Divide both sides by 0.5 to solve for r:
[tex] r = 20 [/tex]
Let's check the answer
The 20% of 30 is [tex] 30 \times \frac{20}{100} = 6 [/tex], while the 20% of 20 is 4. So, we are stating that [tex] 30-6 = 20+4 [/tex] which is true because both expressions evaluate to 24.