We've toured Andalucia a few times. If you're staying in Malaga, you don't need to drive and having a car is probably a hinderance like any large city due to traffic and parking.
The train to Granada is probably best but the coach is also good - the bus station is at the edge of the city, I think the train might be too, but there's a tram that goes to the city centre.
You can see a limited amount of the Alhambra for free by going in the Puerta de la Justica, but it's definitely worth paying for a ticket to see the whole site.
Also second the recommendation to stay overnight (the Plaza Nueva area is well placed as it's a few minutes walk up to the Alhambra and you can also walk the other way up into the Albacin to the Mirador San Nicolas to view the Alhambra lit up at night, there's also a square with some restaurants/tapas bars.
Definitely do El Caminito del Rey, it's spectacular. As for what else to do in the area, it depends what you like. There's dozens of museums and art galleries in Malaga so if that's your thing you could fill a few days doing that.
You could probably get to Cordoba quite easily from either Malaga or Granada. If you wanted to go off the beaten track and see real Spanish Spain, the spa town of Lanjaron in the Alpujarras south of Granada is worth a visit but public transport is infrequent and can take forever.
But definitely a recommendation for the free tapas. Amazing if you're happy to take surprise food and don't have allergies or dietary requirements.