Let's suppose you eat r grams of rice and c grams of chicken. Then your calorie total will be 1.25r + 1.6c, and since you need at least 300 calories, you're looking to satisfy the inequality
1.25r + 1.6c ≥ 300
Looking across all the requirements gives you the following:
1.25r + 1.6c ≥ 300 (calories)
0.3r + 0c ≥ 30 (carbohydrates)
0.03r + .32c ≥ 15 (protein)
0r + 0.025c ≥ 7 (fat)
Any combination of r and c that satisfies all these inequalities will give you everything you need. Of course, you could do this by making c and r huge (say, eat 10kg of rice and 10kg of chicken), and so you'll need some counterbalancing force that pushes c and r to be small. In your problem statement you mentioned you wanted to maximize the amount of each macronutrient, but, as I've pointed out here, that might not actually be what you're really aiming for. :-)
One way to do this would be to minimize the total mass of everything you eat - that is, you'd want to minimize r + c. That would give you back a linear program, which you could use an off-the-shelf solver to handle:
MINIMIZE
r + c
SUBJECT TO
1.25r + 1.6c ≥ 300 (calories)
0.3r + 0c ≥ 30 (carbohydrates)
0.03r + .32c ≥ 15 (protein)
0r + 0.025c ≥ 7 (fat)
The values of r and c that solve this linear program will be the lowest-mass way of eating rice and chicken to get your minimum requirements.
Or, perhaps, you want to minimize the total number of calories that you consume. That could be done by solving this linear program:
MINIMIZE
1.25r + 1.6c
SUBJECT TO
1.25r + 1.6c ≥ 300 (calories)
0.3r + 0c ≥ 30 (carbohydrates)
0.03r + .32c ≥ 15 (protein)
0r + 0.025c ≥ 7 (fat)
There are a lot of variations on this theme. You could factor in the prices of rice and chicken, or minimize fat, etc. But the basic idea is to turn your possible foods and nutrient requirements into a series of inequalities, then try to solve some optimization problem on those inequalities.
Hope this helps!