Jomo Kenyatta Airport is located 20 km from the center of Nairobi. You can get to the city by cab, the cost of which depends on the ability to bargain (a trip will cost about 1200-1400 KES, or 13-15 USD), or by rented car (rental fee - from 2800 USD per day) - this service is offered right at the airport by Avis, Sixt, Naz, Budget, Payless and others.
The cheapest way is to take a bus (route #34) and get to the capital for about 1 hour for 60-80 KES. Keep in mind that the bus only runs until 19:00.