Hospitalized patients who have failed to respond to at least 4 full days but no greater than 14 full days of therapy with SMX/TMP or PEN are randomly placed into one of three study groups. Patients are stratified for (1) mechanical ventilation at enrollment, (2) prior zidovudine therapy of at least 4 weeks duration, and (3) first versus subsequent episode of PCP. One group of patients receives TMTX by intravenous infusion for 21 days and LCV for 24 days. The second and third group of patients receive either PEN or SMX/TMP depending on which therapy they have already received and not improved on. The difference between the second and third group is that the second group receives the conventional therapy (PEN or SMX/TMP) and a placebo (inactive medication) and the third group receives the conventional therapy and prednisolone. Neither investigators nor patients know whether patients receive methylprednisolone. Patients continue study treatment until a study end point is reached or for a minimum of 21 days (unless there is toxicity).