Bus route: Metro Line 4 → Metro 10, the whole journey is about 12.7 km.
1. Walk about 530 meters from Shanghai Coach Passenger Station to Shanghai Railway Station.
2. Take Metro Line 4 and arrive at Hongqiao Road Station after 7 stops (or take Metro Line 3).
3. Walk about 160m and transfer to the subway 10 line.
4. Take the subway 10 line and arrive at Shanghai Library Station after two stops (you can also take the subway 10 line).
I hope I can help you.