We all travel differently. Some of us are "faster" travelers and some are "slower." By fast and slow, I mean the pace we enjoy while traveling. Are you a go-go-go traveler, or will you want some down-time days? Also, when considering day trips, we have different tolerances for how long a drive we will tolerate as a day trip.
My wife and I took a 3 week trip to Spain in 2012.
- Week 1: we flew to Madrid and spent 6 nights in Madrid. That gave us 3 full days for Madrid and 2 additional days for day trips by train (Segovia and Toledo).
- Week 2 was at Playa Andaluza. You can either fly from Madrid to the Costa del Sol or go by train.
- Week 3: during most of week 3, we used our rental car to take a driving loop through Andalucia: Seville, then Cordoba, then Granada. We stayed at hotels in each city.
We took several easy day trips from Playa: Ronda, Gibraltar, Malaga, some of the other "white towns" of southern Spain. Tangiers can be reached by ferry, but we didn't try that. And we spent a bit of time at the resort. Memories are funny. I remember that we drove to a nearby market. We purchased a frozen bag of mixed seafood, some pasta, oil, garlic, and a bottle of Spanish red wine. I still remember enjoying the seafood pasta my wife prepared as we sat on our balcony overlooking the sea.
We also are not beach people. I don't recall exactly, but we wouldn't have spent more than one day visiting the beaches.
I have in my old notes that the drive from Playa to Seville is 2 1/2 hours. Without looking it up, I can't tell you how long the drive would be from Playa to Cordoba or Granada (Google will tell you). I do have in my notes that Granada to Malaga airport (we dropped off the car and flew home from there) was 1 3/4 hours. I also don't know how easily you could travel by train if you preferred not to drive. We do not enjoy long driving days and that is why we did that driving loop and stayed in hotels in each of those cities. But it would be easy to fill your second week this way if you were OK with using Playa as your base and OK with the length of the day trips. In my opinion, one day was enough to see Cordoba - the big sight is the Mezquita. You could easily spend more than a day in Granada (I remember making reservations for the Alhambra in advance) and even a few days in Seville, again all depending on your travel "style." So if you wanted to use Playa as a base and then overnight at a local hotel in Granada and/or Seville to lessen the driving, I think that's a very workable plan.
I like to use the Rick Steves travel books for Europe. I have learned that whatever amount of time he recommends for a destination, I need to add at least a day (sometimes 2) more so that we can enjoy the destination at the pace we like.
Overall, this was a fabulous trip. We were there during the first 3 weeks of October and were fortunate to have wonderful weather.
Have fun planning it. You will likely want to return to Spain on another trip. We did, visiting Portugal and the northern part of Spain, but that's a different post.
--------------------------
I'll add another caveat. Our Seville hotel was in the center of the city. Driving in the center of Seville to reach the hotel was not easy. The streets are narrow, twisting, and there were many one-way streets. Typically my wife drives and I navigate. I had a GPS for Spain, but because the streets are so narrow with buildings on both sides, I kept losing the darn GPS signal. We went round and round, and she got more and more frustrated with me, until we finally made a lucky turn and found our hotel. That was it for driving in Seville. We parked the car and only picked it up when we left the city.
The drive into Cordoba was much easier. Granada was intermediate in difficulty, if I remember.