You will have to pick up your luggage before clearing customs. In normal circumstances you wouldn't exit into the arrivals area but would pick up your bags and follow signs to American customs and immigration. In this case you pick up your bags and take them to the arrivals area (keep the tags on) and visit with your friend and then go past the check-in counters in the departures area to the American customs and immigration area. You will then pass through customs/immigration, drop off your bags and then pass through security.