To study the safety and effectiveness of trimetrexate (TMTX) plus leucovorin calcium rescue (LCV) in the treatment of Pneumocystis carinii pneumonia (PCP) in patients who have AIDS, patients who are HIV positive, or those for whom laboratory confirmation of HIV infection has not yet been established if they are at high risk for HIV infection, and who have not responded to standard treatments or who have demonstrated severe or life-threatening intolerance to both conventional therapies for PCP.