I feel like the two answers just now are not the best! Since the poster asked about the shortest time and taking a train, I ignored the price issue! G132 Tai'an 15:55, Beijing South 17:47. Duration: one hour and fifty-two minutes. After arriving at Beijing South Railway Station, taking a taxi will take you at most half an hour to Beijing West Railway Station! Then take T277 Beijing West Railway Station: 19:01, Yinchuan: 08:13.
Lasted 13:12 minutes! So it only takes: seventeen hours to arrive!