Plains Exploration & Production Co. agreed to buy a number of deepwater Gulf of Mexico assets from BP PLC for $5.55 billion as part of BP’s previously announced plan to divest the assets and focus its gulf operations on producing more high-margin barrels from fewer, larger assets.