I need to learn how to eat properly.

I went to the doctor's yesterday, and my weight is shockingly low. I think because I've been building muscle, I didn't realize I was losing weight. I know weight =/= health on both sides of the spectrum, but I don't think this weight is healthy for me. I'm worried the weight loss is actually from losing muscle that I've worked so hard to gain. I think I'm not eating enough or the right things to sustain my level of physical activity. I think it may be hurting my strength and endurance.

There are certain things I know I should change. For example, I only eat two meals a day. And because my schedule is now so busy , I usually don't eat dinner until 10, at which point I'm so hungry and tired that I either eat randomly (like chips and a green juice) or eat really little so I can sleep. Neither which I imagine is good for muscle recovery. I try to cook as much as possible which makes me eat proper food even if on a really off schedule, but I'm only going to get busier the next three months.

I have some inkling of what I should do (probably eat breakfast, and have snacks during the day???), but I don't really know anything about nutrition things like protein and calories. Halp?