First - please consult your physician on a good approach- the guidance below worked for me but I can't in good conscience say I advocate it or think it's the healthiest thing to do.
With your starting weight, ten pounds is a very large gain - In a short amount of time - don't do it and know you don't have to (keep reading). A number of us on the board are former wrestlers so weight control is something we've tackled to down/ up weight classes as needed each year. When I had to gain weight, I packed calories. For me who also used to be a lower weight (oh how I miss that problem!) the most efficient way to move the needle for me was simply to drink a large milkshake with a banana/ some cookies, a protein powder and carnation brand instant breakfast mix (not even sure they still make that)in it shortly before going to bed nightly and again once at some point during the day. The ones I made were almost 1000 calories each. the weight came on, even while maintaining exercise, then it was up to me to convert that. That 2000 calorie add definitely made a difference.
Approach this like a prize fighter. I wish to point out that you only have to be 10 pounds higher at the moment when you step on the scale, not as a standing weight, and you can take more time to continue to gain weight in a slower/ healthier fashion over the months ahead before reporting at school or summer activities. Meaning, if you slowly drink a 16 ounce bottle of water per hour in the 4 or 5 hours before weighing in (read- do not chug 5 pounds of water quickly- DANGEROUS), and don't go to the bathroom in as many hours before getting weighed in as you can comfortably stand, you can swing the scale by 5+ pounds. You can also drink one more in 15 mins before you get on the scale - another pound. You can call your DODMERB physical MD's office and explain that you would like to be weighed in as soon as you arrive, and why - that way you don't have to sit uncomfortably in the waiting area feeling like you're going to burst. I would recommend targeting a lower weight gain - like 5 or 6 pounds, and take the steps above to make the 10 pounds at the weigh in. I also recommend dry-running this a couple of times to see what you can handle. Wrestlers often use a sauna and starvation to tip the scale the other way - you're just doing it in reverse.
Maybe by next Fall you can gain the full ten pounds until then, it's one pound at a time. Is your exam already scheduled? I would push it back as far as you can to maximize the time you have to meet your goal safely.
Good luck and hope that helps you. Also agree with the guidance on seeing a trainer/ nutritionist but know if you eat lower calories and exercise and only eat healthy - well, maybe the nutritionist can help because I don't know how that formula leads to weight gain.
Good luck.