To compare the safety and effectiveness of an investigational drug therapy (trimetrexate plus leucovorin calcium) with that of conventional therapy (sulfamethoxazole-trimethoprim) in the treatment of moderately severe Pneumocystis carinii pneumonia (PCP) in patients who have AIDS, are HIV positive, or are at high risk for HIV infection.