I am booked into Hostal Madrid in Madrid (near Sol and Plaza Major) and the Hostal-Residencia Ramos in Barcelona (off-Rambla, near Metro Liceu).

It's my first time in Spain and in these cities. Please could someone advise me if I have chosen good hostals in good locations.
Am also arriving late evening so want to be fairly safe getting to my hostal.