It's generally not a good idea to try to pursue both at the same time - you won't do as well at either and you'll get frustrated for 'failing'.
Generally there are two aspects to 'cosmetic' fitness (aside from general cardiovascular health): cutting fat and gaining muscle. Since the one requires a caloric deficit and the other simply demands a caloric surplus you'd almost have to break the laws of thermodynamics (i.e., take in less energy in the form of calories than you need in order to burn fat while also using excess energy to repair and build muscle) to do what you're suggesting.
This is what I'm doing right now, as I started at 5'8 185 and am now down to 158.
Step 1: Cut the fat
Step 2: Build muscle
Step 3: cut the fat you will innevitably add while running a calorie surplus in step 2
Repeat until you're happy with the results, and then start a maintenance routine.