You’ve asked questions that are almost impossible to answer without more information -
Will you have a car? Los Angeles is a 7 to 8 Hour drive. from San Francisco, Las Vegas is a bit longer. Do you want to spend two of the four days driving back-and-forth to some other location?
what are you interested in San Francisco? People tend to want to see the Golden Gate bridge, maybe some museums, the cable cars etc. – do you have any special interest?