what type of exercising you doing?
what type of muscles do you want? by this i mean do you want to work on explosive power, strength, or do you want the looks of muscles? explosive = plyometrics/power lifts, strength/looks of muscles requires lots of reps with a decent weight - so you can increase the fibers in your muscles so you look like you got muscles
talk to your trainer about what you want and he should offer a new strategy - especially since it sounds like your prior workouts was to shed weight, it's totally different workouts.
plus with your diet, lots of people jump straight to "i should intake x calories a day" that shit is wrong dude - if you don't even work enough to burn that amount of calories a day you'l put on weight, you need to have a diet that works along side with your workout - which means it'll change constantly with your workout.
shit gets really complicated so read up on complex and simple carbs, plus protein synthesis and the differences between each type of protein - good nutritution does more than workouts. (i.e. mixing protein shakes with different types of proteins[digestion rates] so your body is constantly engaging in protein synthesis. no complex carbs before bed, simple ones are fine such as fruits etc.)
final note, shit gets expensive.