Pop quiz time!

Two little piggies each have $5,000 pre-tax to invest in their IRAs. Piggy A decides to invest the entire $5,000 in a Traditional IRA. Piggy B decides to invest in a Roth. Both piggies are in the 25% tax bracket. After paying $1,000 in taxes on his $5,000, Piggy B only has $4,000 to invest in the Roth. Both piggies invest in the exact same ETF and each of their accounts grow at 8% over 30 years. When they retire, both piggies remain in the 25% tax bracket (for simplicity, assume a flat tax instead of marginal tax brackets).

If they both take all the money out of their accounts, and Piggy A pays the taxes on his Traditional IRA, which piggy is left with more money?