Make the sentence simple: Before that, he was 42nd Mayor for San Francisco (to which he was elected in 2003 and again in 2007).
In 2003, Newsom was elected the 42nd mayor of San Francisco, becoming the city's youngest mayor in a century.