Yes. Four hours is more than sufficient for you to get to a different terminal. All the terminals are connected by small trains and it's easy to reach them. Lookout for signs that indicate this commute. If you cannot figure out ask any airport / airline authority and they will help you. Have a nice stay and have fun in SF!
No but are is train
Thanks! Your answer is awaiting moderation.