My sister had the same problem, she wanted to gain weight. I told her to start taking my wpc/mpc's with a simple enough exercise routine, and she ended up gaining lean weight, she's pretty happy with the results. I'd type it out, but I'm too lazy to do so atm, so I'll type the basics out.
Eat wholemeal and lean stuff, don't go overboard on carbs, your body will convert extra carbs into fats. The way to do gain or lose weight successfully is by eating the right things, the right portions and exercising too (if u want to gain lean muscle weight and not fat)
Start by calculating how much kcals your body requires daily to maintain your current weight(RMR).
Find out your weight in lbs and multiply it by 11 and then by a factor of 1.2-1.3(if you do very light movement around the house), 1.4-1.5 (moderate movement) or 1.6-1.7(if you do a lot of movement, exercise etc).
So for example a person weighing 100lbs with moderate movement i.e walking, housework etc would require :
(100 x 11) x 1.4 = 1540kcals daily (RMR) to maintain their current weight
To gain weight, add 200-500kcals to the RMR
For your protein intake, its recomended to take 1.0-1.2g/lb of body weight.
fat intake : 20-25% of total intake
carbs : the rest, mainly wholesome stuff like oats, bran etc etc..
I duno if any of that is gona help :/ I remember trying to explain it to my sister but she didn't get it at all :/ so I ended up making her a plan. If you think any of the above is helpful and need more info, just reply back :/