Is it possible to do a round trip to Great Wall of China within a transit time of six hours? Namely, from 2pm to 8pm on a working day.
Yes, it is possible. For this I wouldn't bother with trains - a prebooked ride from airport to Badaling would take 1-2 hours. This gives you two hours to see the Wall - which is not much, but you can still take a cable car up, and then walk down to the exit. You can do this in an hour if you're in a good shape and have good walking shoes.
You should prebook your ride with one of many car hire companies, agree on schedule, destination and price. Do not take taxis, and do not expect the taxi drivers to speak any English.