Well......downtown has good & bad areas. What hotel did they recommend? Downtown is about 5 miles, as the crow flies, but its about 20 min with traffic.
Not many SF hotels are less than $100/night, but if they recommended it, perhaps they'll give you a university rate.
As for MUNI - you have to be sure to get on the right line. The N-Street Judah line is the trolley which travels on Judah - one street east (down a hill) from the school (toward GG Park). However...there is an elevator which takes you up from the parking garage on Judah up to Parnassus which is the street the school is on. You just have to cross the street & you're there.
Otherwise, I think the bus line is the J Street bus (I think)...that takes you right to Parnassus. But, depending on where you stay, you may need to transfer. You can access their website online.
Admittedly, its been a long time since I've taken public transportation to the school!
Now...a cab will get you there - about $25 I think from downtown.
No matter what kind of transportation you take....plan to get there an hour early! You need time if you have gotten on the wrong bus/trolley or if you're going at a busy time....they'll pass you by. Not to worry - it gives you time to go across the street to the student union & the library & check those out. Have a cup of coffee, find the office you need to locate, use the restroom, brush your teeth, etc......
Let me know the cross streets of the hotel & I'll tell you if you're in a safe spot. I can't really imagine them recommending an unsafe place though. No matter what - you're in a big city - don't be stupid & don't carry lots of money or obvious valuable stuff.
Good luck & let me know if I can help more!