Outbound: Check bags at SFO and do not recheck at LAX.
Return: Check bags in at NRT. When you land in the US at LAX...
#1 Clear immigration.
#2 Collect bags from baggage claim.
#3 Clear customs.
#4 Recheck bags right after you exit customs.
#5 Go to the gate for your connecting flight.