Starting with 3 trillion trees, the reduction needed to reach 400 billion trees is 3,000,000,000,000−400,000,000,000=2,600,000,000,000 trees. Given that 15 billion trees are lost each year, the number of years required is 15,000,000,000 / 2,600,000,000,000
=173.33 years. Therefore, it would take approximately 173 years to reduce the number of trees to 400 billion if no new trees are added and 15 billion are lost annually.
Of course trees are added, and it’s not clear if the 15 billion number is net loss. Assuming not, the number of years could stretch to infinity.