Patients will inhale one dose of radiolabeled aerosol containing pentamidine, and an image of the lung will be taken immediately and then 24 hours later to determine the amount of pentamidine reaching the various areas of the lung. Patients will then undergo a bronchoalveolar lavage (BAL) in order to recover the PCP organism from the lung and to corroborate the diagnosis of PCP. If PCP organisms are detected, patients will be randomly assigned to aerosolized or intravenous pentamidine and treated for 21 days. Patients taking pentamidine by aerosol will repeat the radiolabeled aerosol study on day 9. The BAL will be repeated at the end of therapy for all patients. If patients do not improve within 9 days, they will be switched to another therapy. After completion of therapy, patients will be given the option of prophylactic therapy, i.e., doses of medication to prevent reinfection, for PCP. All patients will be carefully assessed every 4 weeks for 6 months whether they begin prophylactic therapy or not. Zidovudine (AZT) may not be taken during the 21-day trial because of the increased risk of side effects, but it can be resumed when PCP therapy is completed.