First when buying
second hand ask how many pictures the camera has taken, exif files have that information. I wouldn't touch a high milage camera. if you bought new it would have a warrantee which
second hand would not. Starter lens price 55-250mm £210 to cover most events before deciding what you want to concentrate on subject wise
This would have to be purchased on top of the second hand camera.
Ok the canon 40d is 10 meg pix whereas the Nikon D40 is only 6 meg pix. I would not worry too much about the 4 meg pixel difference what I would compare is the price.
The Nikon D40 can be bought new for around £210 including a lens,against the second hand Canon sold for £200 without the lens but the camera sold new is about £500.
You have to take into account that the entry level Nikon won't have all the features of the second hand one.
The 450D Canon is around the £450 mark depending on shop but then you would also have to purchase a lens say the Canon 55-250 mm ( you need a good range for first time) with say a 4 gig card and postage if buying thru the internet about £700, just a rough guess.
I would be incline to go for the Nikon D40 and have the lens included so your ready to start shooting( don't forget the card is extra) with the warrantee to back it up.
Really it all comes down to how much you want to spend. If you go for the 450D obviously you are getting a far far better camera for your bucks with all the bells and whistles on.
To sum up if money was an issue I would go for the Nikon D40 or else go for the Canon 450D and not have to think about upgrading at a later date.
Realspeed