You will spend close to an hour in immigration/customs after your flight from Europe. Taxi ride to Manhattan takes around 45-50 min, one way(flat fare of $50.50). Don't forget that you have to be at the airport at least 2 hours in advance for your SFO flight. If I am doing the math correctly - it would be very tight for you, not to say impossible.
You will spend close to an