With cold engine, car starts normally without any trouble. After driving 2-3 miles, when car attains its temperature, it does not start again if switched off. If i use 2 batteries (the 2nd one with a jumper) to start the car, it starts again. I have got battery checked. Battery is in good condition. I think problem is with starting motor. Can you please tell me what really is the problem here? is Starting motor or starting solenoid faulty?

first, have the alternator load tested, if weak, it will do that. If it's fine, just replace the starter, old ones heat up from engine block heat, then short out