From Patna Junction, the best way is to just book a cab to Gandhi Maidan. Instead of going towards the bus depot here, you will find IIT Patna buses outside, board one of them. It will take around 3 hours to reach IIT Patna.
From Patna railways get down at Danapur railway station and wait for the bus. I think it will take less time to reach the IIT Patna campus. The timings of these buses are available on the IIT Patna website.
The people of this city are very approachable and will guide you.