This is something I've often wondered when playing Teemo. If I place a bomb, and then an enemy walks over it seven minutes later, how is the damage calculated? Is it based off of how much AP and what items I had when I placed it, or is it instead calculated off of my stats at the time the enemy triggers it?
Damage in League of Legends is calculated "just in time". That is, there are no damage calculations performed until the game has confirmed that a unit has taken damage.
This has a couple of interesting ramifications. For instance, if you level up a projectile or projectile skill shot while the projectile is in flight, it will do the damage of the new rank, not the rank you had when you triggered it.
It also means that Teemo's shrooms only calculate their damage when they trigger, and that all placed shrooms are always at identical power, regardless of when they were placed.