Rearranging formula: Required return on equity MM(II)

Guys,

For some reason I am having trouble rearranging the equation and isolating R0 in the MMII formula (with tax). Could someone please help me out and spell out to the process? It is much appreciated.

Re = R0 + D/E [(R0 - Rd)(1-T)]

This is my attempt but I cannot guarantee it’s accuracy.

Re = R0 + D/E[R0-Rd-TR0+TRd)

Re = R0 + D/E(R0) - D/E(Rd) - D/E(TR0) + D/E(TRd)

Re = R0 + D/E(R0) - D/E(TR0) - D/E(Rd) + D/E(TRd)

Re = R0(1 + D/E - D/E*T) - D/E(Rd) + D/E(TRd)

R0 = [Re + D/E(Rd) - D/E(TRd)] / [(1+ D/E - D/E*T)]

R0 = { Re + D/E [Rd(1-T)] } / { 1 + D/E(1-T) }

Thanks man.

Anybody knows how we can derive this from WACC equation?