How can I rearrange the voltage divider formula for R2?
It's just manipulation of algebra. Make R2 the subject of the equation.







simulate this circuit &ndash; Schematic created using CircuitLab

\$V_{out}  = V_{in}*\frac{R_2}{R_1+R_2}\$

\$(R_1+R_2)*V_{out} = V_{in}*R_2\$

\$V_{out}*R_1+V_{out}*R_2 = V_{in}*R_2\$

\$V_{out}*R_1 = V_{in}*R_2 - V_{out}*R_2\$

\$V_{out}*R_1 = (V_{in} - V_{out})*R_2 \$ 

\$R_2 = \frac{V_{out}*R_1}{V_{in} - V_{out}}\$