Deriving the Modigliani--Miller Theorem

In the Wikipedia article on the Modigliani--Miller theorem, it states two propositions. (It gives the cases of with and without taxes. Here I'll just focus on the case without taxes.) The first proposition is that the value of an unlevered firm is the same as a levered firm. Given the assumptions, this is clear from the discussion:

To see why this should be true, suppose an investor is considering buying one of the two firms U or L. Instead of purchasing the shares of the levered firm L, he could purchase the shares of firm U and borrow the same amount of money B that firm L does. The eventual returns to either of these investments would be the same. Therefore the price of L must be the same as the price of U minus the money borrowed B, which is the value of L's debt.

$$r_E(Levered) = r_E(Unlevered) + \frac DE (r_E(Unlevered) - r_D),$$ where

• $r_E$ ''is the required rate of return on equity, or cost of equity,''
• $r_D$ ''is the required rate of return on borrowings, or cost of debt,''
• and $\frac{D}{E}$ ''is the debt-to-equity ratio.''

The article states that the "formula is derived from the theory of weighted average cost of capital (WACC)." (See a related question here.) My question is this: how can we arrive at this result from WACC?

$$r_E(Levered) = \frac{E+D}{E}r_E(Unlevered) - \frac{D}{E}r_D$$
$$r_E(Unlevered) = \frac{E}{E+D}r_E(Levered) + \frac{D}{E+D}r_D$$