Could I lose weight, gain muscle, but have more fat?
[I've lost about 105lbs since Jan. ‘16. For whatever reason, Quora won't let me use that as a credential.]
Look, so far as is relevant - what you can change through your actions, how you eat and exercise - "weight" is composed of muscle and fat. If you've lost "weight," and gained muscle, then you must have lost a greater amount of fat than the muscle you gained.
Suppose you weighed 200lbs. You exercise more (probably some weight-bearing exercise, if you're putting on muscle), eat a healthy diet, then get on the scale and see that you weigh 190lbs. You've lost 10lbs of total weight. But you say you've put on muscle, so I'm assuming you've gotten measurably stronger. That means you lost at least 10lbs more fat than the muscle you put on. So if you put on 10lbs of muscle, you must have lost 20lbs of fat. (200 + 10 - 20 = 190.) If you put on 20lbs of muscle, you must have lost 30lbs of fat. (200 + 20 - 30 = 190.)
Unless you've had a lung removed or something, there's no way to have lost "weight" while gaining both muscle and fat.