If you're leaving from here, going back to Funchal is the best idea.
From here, the best idea is to backtrack along the main road towards Funchal, either heading inland to Pa??l da Serra or heading a bit farther east on your way toward Serra de ??gua and Sao Vicente.