It depends on how far the planes are from you. If you're photographing them as they take off over your head then you won't need to zoom-in very far at all. If however they're quite far away, then you'll need more magnification.
The Nikkor 55-200mm is a great all-round choice to compliment your kit lens, but if you need more magnification, you might want to consider the Nikkor 70-300mm. They do two versions, one with and one without anti-shake. You'll need the anti-shake version for your D40 becuase the other version won't auto-focus with that body.
Note: If you move the camera to follow the plane while taking photos, you'll need to switch the anti-shake mode to Active.
So here are your main choices:
Nikkor 55-200mm with anti-shake
Nikkor 70-300mm with anti-shake
Or if you want one lens to do everything, consider swapping your kit lens for the Nikkor 18-200mm
. It's pricey, but very flexible as it goes from wide angle to telephoto AND it has anti-shake.
Click on the names in red to check their prices from Amazon, and if you're thinking of buying from Amazon, please click through to their site from these links first!
As you can see the 55-200mm represents the best value, and if 200mm is sufficiently magnified, then it's your best choice.