Ports, rates put P&O back in black