BP agreed to sell its interests in ethylene and polyethylene production in Malaysia to Petronas for $363 million in cash.