First of all, there is enough time, but you can't stay at every scenic spot for too long.
When you get off the train, take bus No.845 or No.47 at West Railway Station and get off at Deshengmen (if you get off at Beijing Railway Station, take the subway to Deshengmen), and then take bus No.919 to Badaling directly. It is estimated that it will take two and a half minutes.
Go back and take 9 19 to Deshengmen or somewhere with a subway. Then take the subway and get off at the nearest Tsinghua and Peking University Station. Walking from Peking University to Tsinghua doesn't feel very far. It is estimated that it will take two hours.
Then take a bus or taxi at the gate of Tsinghua to Tiananmen Square. It is also convenient to go to the railway station by bus or subway from Tiananmen Square.
With any luck, 1 1 hour is enough. I hope you won't be caught in a traffic jam. In addition, I suggest you choose the subway (fast and safe) as your means of transportation.
Have fun!
By the way, staying in a hotel near the subway station is the first choice. I feel that hotels in Beijing are still very safe. Basically, a standard room is about one night in 90 yuan.