Stuck Midway-struggle with last 20 pounds.

A little background first,I moved from India to US for my masters degree in 2007.I had no knowledge about portions/carbohydrate/protein etc.I quickly gained weight and b February 2009 i was 190Lbs.I reduced my cals to 800 cals a day and worked out 3 hours-cardio a day and lost 36lbs in 3.5 months.

Then i added strength training and added fish to my diet and raised my calories to 1200.I maintained here for almost 3 years-i didnt log food or anything during this time.After finishing my Masters and switching to work life I crept back to 170 pounds,then i reduced my calories again to 1000 and got down to 154 pounds.

Then for my brothers wedding last summer i wanted to lose a bit more ,when i consulted my doctor-she had put me on phentermine and asked me to eat 500 cals a day-i lost 10 pounds in 2 weeks-I was happy not realizing the damage i have done(had no knowledge).A few months later i started developing anemia,allergies,hair fall,breaking nails etc.

From Last November I joined MFP,educated myself properly and I worked out with a Personal Trainer and I worked my way up to 1700-1800 cals a day-I first went upto 157 and got down to 150 pounds.However i developed knee problems-so i was asked by my Physio therapist not to run/do repetitive motion(lunges,squats)-It was Patella Femoral Syndrome.

This year I got married in March in India-with all that hustle i lost 3 pounds more,but then in my honeymoon in Paris and Italy-i crept back upto 164 pounds.From april i ate 1400 cals a day and worked out everyday,with strength training,havent lost in 2 months,then I upped my calories to 1700 and lost .6 pounds a week,then i stalled again,since May i have been gaining and losing the same 4 pounds 160lbs to 164lbs.I want to get down to 140lbs,I had a hydrostatic bodyfat test done and i had 112 pounds of lean mass and 32% fat,I want to get down to a lower body fat percent-around 22-24%.I carry all my fat in my thighs and stomach-rest of my body is pretty toned.

According to scooby workout i was asked to eat 1900 to lose 1 lb a week.my bodybugg shows i burn and average of 2300 a day working out 5 days a week-including cardio and strength.Im primarily vegetarian-but i did add protein shakes to reach my protein allowance.I started P90x as of July30(I workaround the moves hard on my knees-i can do static holds etc).Any tips or advice as to changes that my dairy/workout routine needs?Please Help-if you have any ideas/strategy.This thing is taking a toll on me and making me feel like a failure.Im 5" 5.5 tall.

PS:I took this week off logging,theres stuff that Indian in my dairy there-But they are all whole multi grain and vegetable based foods.