Today at my gym i did 35 minutes of the bike. I averaged 7.11 mph and went 4.92 miles. Did I build any muscle ?
No one knows if you built muscle doing that or not.
I mean this should have since I used my legs to fight resistance.
Every moment of every day you're resisting the gravity of planet earth. Every time you move, you're resisting gravity, wind, and the tendency of objects to remain doing what they're doing unless acted upon. You see where I'm going with this? Maybe the resistance your legs fought today was sufficient to stimulate muscular hypertrophy. Maybe not. The fact that it was resistance doesn't give us an answer.
Is this an effective way of building muscle, getting cardio, and losing the most calories ?
For someone who's never trained before, anything will allow them to build muscle. Back when I was so skinny you could easily count all my ribs, doing chest stretches helped build my pecs. Starting out, anything will work. Is this an effective way to build muscle while achieving your other prerogatives? Not really.
What are some leg workouts that are better ?
Exercises such as squats, deadlifts and leg press, with progressive overload (always making sure that technique is good before moving up the weights) are ideal for building leg muscle mass. These exercises, being wholebody movements, also demand a lot of the cardiovascular system. One of the most intense things I've done (after spending a lot of time mastering technique so that I could do it safely) is 20-rep squats, which, on average, leaves me unable to walk in a straight line for about 15min afterwards. I wouldn't recommend going straight for that. A better option for you would be to do all your lower body work in sets of 3x8-12 with only about a minute's rest between sets, and then once you've finished all your lifting, get on the bike for half an hour.
Also, you need to divide up your goals. You're talking about building muscle and burning the most calories. To build muscle you want to be consuming more calories than you're using. To lose fat you want to be consuming less calories than you're using. You can't be in a calorie surplus and deficit at the same time. Train to build muscle, train to improve your cardiovascular system, and eat either to get bigger or to get smaller. Stick with one goal for at least 3 months, and then switch to the other goal.