Working out😩

So I've always had an active life, 8th grade- sophomore year of high school I was medically anorexic from medications I was taking, but also mostly muscle from softball and gym, I was around 140-150 then (yes it constantly changed). Junior year- senior year, I was starting to realize how toxic my relationship was, and gained weight like crazy, I was bordering 180. Almost a year ago, he broke up with me after cheating on me, and I lost a lot of weight, I was back down to 155. Anyways, I've always been very active, I play and coach softball and walk. Well recently my new boyfriend and I eat out alot, so I gained some weight, 163, and recently I've been at the gym religiously, 6 days a week, I met with a personal trainer and set up a routine to tone up, well now I AM GAINING WEIGHT! AND I'VE BEEN EATING A LOT MORE HEALTHY!! 😩😩 can someone tell me this is just the muscles rebuilding and that the number is going to drop?? Sorry for the long back story, I figured it might help a little? Idk. I'm just stressed about the scale going up when it should be going down!