Its all about calories in vs calories out. find out what your maintenance line is (how many calories u need to eat to maintain ur weight), then eat more than that and you will gain weight.

Theres no rule for how much cardio u can do. The only problem with too much cardio is that it means you will have to eat more.

BMR calculator
Nutrition

Calorie counter site:
FitDay Free Calorie Counter and Diet Journal: Login.