I give the nod to Reagan.
Beefing up foreign policy and the miliitary
where badly needed when he came to office and Reagan addressed those
issues. On social issues, I am not a fan of Reagan, but that's another
story.
As for Carter, good honest person who was trying to do the right thing,
just wasn't the right person for the job. He also got stuck holding the bag when inflation peaked under his watch for stuff started during LBJ's time. One of the better things he did do though (although he didn't directly benefit from it) was appoint Paul Volcker as Chairman of the Federal Reserve Board. Reagan benefitted rather nicely from this appointment.