first off, you do need to eat more. i dont know what your goals are exactly but i recommend consuming alot of protein from some high quality whey protein, good meats like chicken, turkey, consuming alot of good fruits and veggies (ex: broccoli, green bean, berries,), and good carbs like whole wheat and oatmeal early in the day. its pretty easy to accurately estimate how much calories youre consuming just look at nutritional information.
secondly, 2-3 hours in the gym is wayyyyyyyy too long. i’d recommend starting off by doing split routine training like chest/tris on one day, then back/shoulder/arms another day, and legs/core another day. however you wanna split it is up to you. you shouldnt spend anymore than an hour in the gym, if youre training longer than that you are probably over training which will put a halt to your growth
also what are you doing for cardio? if youre just doing some aerobic jogging and arent drenched by the end of your cardio session, then it aint cardio. depending on your fitness level and flexibility, i would consider doing circuit training. or hell, you could just do some squat jumps, push ups, and mountain climbers back to back 10 reps of each and do 3-5 sets i guarantee youll be sweatin and breathin heavy after that, lol! you will want to make sure you are at a good level of balance and flexibility before doing some intense training like that though, which can be done by doing some simple balance and stretching exercises. just look up balance training and smr, static, and dynamic flexibility.
hope this helps man