Proof that if P=PSPACE, RP=BPP

Like the title says. I can’t figure out how to prove this.

I think it probably has to do with the polynomial hierarchy collapsing but I’m not sure.