Marathon agrees to $2.5B purchase of BP refinery in Texas