I want to continue to lose weight but also keep muscle if possible.
Okay. Something like this:
Determine caloric needs for a day. Use a BMR calculator. Subtract 5-700/day, this is how many you have.
First, fill with protein. Aim for 1g/lb. This is satiating, muscle preserving and nutritious, and is kind of hard to turn to fat.
After, focus more on fats. Fats from the meat, fats from nuts, fish, cheese, etc.
Last, the carbs. You don't actually need any, but a lot of people find having some carbs helps with the ease of the diet and their energy levels during exercise and daily life.
So say you are a 6' 30 year old inactive (daily life, not exercise) male of 200 lbs. you'd burn approx 2200 calories a day. Therefore your target is approximately 1500-1700 calories a day to lose a bit over a pound a week.
Now start adding protein. You're looking for 200 grams, so that's 800 calories a day of protein or so. You're down to 700-900 calories exclusing protein. Now add in some fat, maybe 50 grams a day (make sure to eat some saturated fat to support hormone levels, and some omega 3 oils). That's another 450 calories a day. The remaining 250-450 calories come from carbs, so you're looking at 60-100 grams of carbs a day more or less.
Now that you're got your diet figured out and are making whole food choices, time to look at the exercise.
Now an hour of moderate cardio is about 500 calories, and similar calories for vigorous weightlifting. If you're doing 2 hours of cardio and 2 hours of weights a week, that's another 2000 calories you're burning. You'd be on track for almost 2 pounds a week, which is the top end for fat loss without significant metabolic damage. Of the two activities, prioritize the weights because the weights keep muscle on. your body will happily burn muscle unless given a reason not to, so it's important unless you want to look like a potato sack at the end of your journey and find a lot of walls along the way. Think heavy movements if you can, something like squats/deadlifts/benchpress/chinups/dips/overheadpress. If you can only do non-gym movements, then try to at least grab a couple of kettlebells or something but pure bodyweight can still keep a fair bit or muscle on if you're not strong to start out with.
Do this for as many weeks as you want to lose pounds, weigh yourself once a week in the morning after you hit the can, and don't be worried if it happens in fits and starts. Drink water, lots of it. Good luck and keep us posted!