Library: There are two in Xinjiekou area. Take bus No.2 and get off at Hubu Street Station, which is the ancient Jinling Library. Another newly-built library, Nanjing Library, is the largest library in Nanjing, which has been explained to you, so I won't repeat it here.
Bookstore: concentrated in the center of Xinjiekou. There are two largest bookstores, Xinhua Bookstore and Nanjing Bookstore. Take the subway, No.3 bus, No.31bus and other buses to get there.
Besides, the bookstore is not far from the library, and it takes more than 20 minutes to walk. You can go and have a look if you are interested.