We need to change that 80% of almond into 40%, by adding more peanuts. To do this, we must add the same weight of peanuts as there is in the 80-20 mixture, to halve the ratio of almonds.
Therefore, p=m
Because the total mixture is 5 lbs, and the 80-20 and peanut mixture are the same weight, we know that p=m=2.5 lbs