Let [tex]T,S[/tex] be the number of days spent at Tahoe and San Francisco, respectively.
We don't know the values of [tex]T[/tex] and [tex]S[/tex] yet, but we know that the holiday lasted 9 days:
[tex]T+S=9[/tex]
We also know that each day spent in Tahoe costed 350 and each day spent in San Francisco costed 475. So, the total cost of the holiday is the sum of the number of days muliplied by their cost:
[tex]350T+475S=3650[/tex]
If we put the two equations together, we have the system
[tex]\begin{cases}T+S=9\\350T+475S=3650\end{cases}[/tex]
Which yields
[tex]S=4,\quad T=5[/tex]