d/5 + (40-d)/15 = d/15 + (40-d)/5