Any wireless that does a double hop is to be avoided..
In this case if both your Apple TV and your device that you want to share the screen are wirelessly connected.. things can go very very slow. This is double hop.. first hop device to the airport.. second hop airport to the apple TV. Packets travel very slowly across this connection. If at all possible plug the Apple TV into the airport by ethernet .. the improvement will be out of this world.
If that is not possible.. it might be worth investing in another airport to use close to the TV. See list below of info I need to help you with that.. it doesn't mean a new Time Capsule.. or Extreme.. an older Gen5 AE can be excellent for this job.
It can help to force connections to the fastest speed wireless.. Apple airports (all the current ones) are dual band.. 2.4ghz is slow but long range.. 5ghz is fast but short range. If you connect to the airport on 2.4ghz due to signal it can still be faster to connect to 5ghz.. to do that you need to use different names for each band.
To give you a better idea of what to do I need more info.
Where is your Time Capsule located in relation to the appleTV and device?
Is it possible to plug by ethernet either or both devices?
What model is your Time Capsule?
(Time Machine btw, is software for backup on your computer.. the router is called Time Capsule.. common mistake).