If Jeremy ate 2875 calories with 575 from fats and 230 from sugars, then his percentage of calories from fats is 575/2875, and his percentage of calories from sugars is 230/2875.
Calories from fats: 575/2875 = 0.2 = 20%
Calories from sugars: 230/2875 = 0.08 = 8%