If you're staying in Delhi, go for hostels rather than hotels.
They're affordable, have a friendly atmosphere, you can get along with others in common area, all in all the hostel vibe is quite amazing.
My recommendation is Zostel but you can check out other options like
goStops, The Hosteller, Moustache Delhi, HideIn, Amigos India, Sprinklers. All of them are safe for females and located in south Delhi.
For Agra.... you must book hotel on the fatehbaad road.. which is full of hotels n near to Tajmahal.. Amar yatra is a friendly budget option... n Delhi it depends where you want to go. n visit try to book near to that.