That depends on what country in "west africa" you are talking about. South Africa is a country, where as west Africa could be defined as anything on the western coast of the continent.
Distance between Cairo, Egypt and Cape Town, South Africa, as the crow flies: 4467 miles (7189 km) (3882 nautical miles) . Initial heading from Cairo to Cape Town: south-southwest (191.8 degrees)...
Depending where exactly in Durban and Johannesburg you are travelling to or from it is about 550 km by the N3 highway. Durban and Johannesburg are big cities, so add up to 60km for local variations...
Considering South Africa is a pretty big country, I have taken Johannesburg as a destination point. In that case Chicago to Johannesburg is approximately 14,000 kilometers (8,700 miles).