You need to implement the following logic:
INPUT:
duration = HHMM (HH - hours, MM - minutes)
distance = kilometers
CALCULATION ALGORITHM PSEUDOCODE:
hire = 3.20 + 2.05 x distance + 0.95 x minutes;
if ((journeyStarts >= 2300 AND journeyStarts <=2400) OR (journeyStarts >= 0000 AND journeyStarts <= 0600)) then
hire = hire + 0.15 x hire;