Are you saying you ate 700 calories for an entire 6 months and now you're [thankfully] eating 1500 and you're surprised that you're gaining weight?
How do I say this nicely
? When you starve yourself then the only way to maintain the weight you arrive at after the starvation is to keep on starving. We all know that's just not possible, that at some point we will die from lack of nutrition or we will succumb to the normal desire to eat. At some point we will start eating again but now the body will retain every spare calorie in the hopes of regaining some fat. Your body obviously does not want to be rail thin.
You've taught your body how to survive on 700 calories a day, by the body slowing the metabolism way down, and now the metabolism is in no hurry to speed up until it has some proof that you will be eating again. Until the body gets such proof (and to the body, only time will tell that it can trust you again) the body has decided to store, rather than burn, the excess calories. The body figures that it'll stay at this slow metabolism for a while and allow you to put on some weight, rather than speeding the metabolism up and burning everything you eat as is normal.
This is why starvation diets never work in the long run.
START OVER
Fix your metabolism. Eat what your doctor tells you. Exercise regularly but not excessively. Eventually you may have a chance of fixing the damage you've done. But only if you put health first and body fat %/looks second. Then maybe in a few months or years you have a chance of normalizing your weight.