What reference materials have you got? The formulae should be readily available, then you just have to crunch the numbers.
Do you know the H/(O+H) rules, where H is groundspeed coming home and O is groundspeed out?
Distance to CP = total leg distance x H/(O+H). Then you have to convert that to time using groundspeed out.
Time to PNR = endurance x H/(O+H). Then convert to a distance using g/s O.