First I would turn 500g into kg and then set up an equation like the following.
So lets convert 500g to kg. We do this by using a conversion factor.
Now that we know this conversion factor lets set it up.
Ok now we know Peter wants to lose 0.5 kg or

a week.
Peter wants to lose 1/2 kg a week so we use x for weeks
Lost of weight per week
Next, it tells us that Peter wants to be 90 kg. So he needs to lose 15kg. 105 - 90 = 15kg
Now we need to find out how many weeks will it be untill he is 15kg. So, L
ost of weight per week = 15kg
Now solve for x in 



So it will take 30 weeks at 1/2kg a week to lose 15kg