The striking complementarity of the West African coast (Gulf of Guinea) and the East South American coast (Brazil) is one of geology's most visible clues to continental drift.
~130 million years ago, Africa and South America were joined in Gondwana. The South Atlantic opened as a rift split the continent; the opposing coastlines are the faulted edges of that rift. The "S-shape" reflects the geometry of the spreading center.
The fit extends to continental shelves (submerged edges), confirming the match isn't just shoreline erosion. This visual evidence helped Alfred Wegener formulate continental drift theory (1912)—later vindicated by plate tectonics.