To determine the safety and effectiveness of an investigational drug trimetrexate (TMTX) with leucovorin rescue (LCV) in the treatment of Pneumocystis carinii pneumonia (PCP) in patients who have AIDS, are HIV positive, or are at high risk for HIV infection, and who have demonstrated serious adverse effects from the conventional therapies for PCP.