hi! they are in different directions!
you should open google maps and see their locations..that will give you an idea of what i'm saying.
pinjore is about 20 kms outside of chandigarh on the kalka shimla highway. pinjore gardens there are worth a visit.
rock garden is in chandigarh, so if you want to see this you would be driving all the way back to chandigarh, and then retracing your steps to go to shimla. timber trail is a hotel on the shimla highway. unless you are keen to take the cable car across the valley, its hardly worth stopping here, since it comes soon after pinjore.
hope this helps!