how can i make the content equal the same %? what did i do wrong?

Dinner: Chicken role protein
Fat content = 2.5 grams
1 gram contains fat of 9 calories
2 grams contain fat of 9 x 2.5 = 22.5 calories
Total quantity = 400 calories
Fat content = (22.5/400) x 100 = 5.625%

Protein content = 5 g
1 gram contains protein of 4 calories
8 grams contain protein of 5x4 = 20 calories
Total quantity = 350 calories
Protein content = (20/350) x 100 = 5.71%

To make the content equal the same percentage, you need to adjust the quantities in order to have the same ratio of calories from fat and protein.

In your example, you have calculated the percentage of fat content as 5.625% and the percentage of protein content as 5.71%.

To make the percentages equal, you can try adjusting the quantities and calculate again. Here's an example:

Let's assume you want to have a 7% fat content and a 7% protein content in the total quantity of 400 calories.

To calculate the desired quantity of fat content:
Desired fat content = 7% x 400 calories = 28 calories

To calculate the corresponding quantity of fat:
Desired quantity of fat = 28 calories / 9 calories per gram = 3.11 grams

Now, to calculate the desired quantity of protein content:
Desired protein content = 7% x 400 calories = 28 calories

To calculate the corresponding quantity of protein:
Desired quantity of protein = 28 calories / 4 calories per gram = 7 grams

So, in order to make the fat and protein content equal to 7% each in a total quantity of 400 calories, you would need approximately 3.11 grams of fat and 7 grams of protein.

Please note that in your original example, the fat content and protein content were pretty close to each other already, and the slight difference in the percentages could be due to rounding errors. If you want the percentages to be exactly equal, you would need to adjust the quantities accordingly.