Control of hepatitis B virus (HBV) infection can be difficult in HIV infected people who have taken the antiviral lamivudine (3TC). These people may have HBV that has become resistant to 3TC. Adefovir dipivoxil (ADV) has shown promising anti-HBV activity in clinical trials; tenofovir disoproxil fumarate (TDF) is used to treat HIV and may also be effective against HBV. The purpose of this study is to find out if adding ADV or TDF to a highly active antiretroviral therapy (HAART) regimen that includes 3TC has an effect on HBV infection in patients coinfected with HIV and HBV. The tolerability and safety of these drugs will be examined.