Train travel is a great way to get around. There are ´tourist clase´seats available, which means that certain seats are saved for tourists. This is helful as sometimes the trains fill fast, though I wasn´t in India in July, so not sure how crazy it is at that time of year.
I wouldn´t recomend trying to do too much or go to too many places if your trip is for 3 weeks. India is huge and travel is slow. The highlight of India, I think, is the people and culture and if you are trying to hop around too much, you may not be able to soak it all in and relax.
Also, not sure but I think July is in the monsoon season....lots of rain and possibly difficult to travel. Again, I wasn´t in India at this time of year so I am not exactly sure.
Assuming the monsoon is not in the way, I´d suggest flying in to Mumbai and hitting Goa and then train travel to Rajastan, visiting Udaipur (very cool chill place) and then heading to Ranthambore National Park for tigers, ending in Dehli and flying out from there.
Good luck!