I did a lot of solo traveling in my young-adult years. Scotland is probably among the safest places, in terms of people not regarding you oddly for being an unaccompanied young woman. You can easily strike up conversations with shopkeepers, people sitting near you in a pub, fellow passengers on the bus, etc. However, the usual cautions apply just as you'd do in the USA when going out after dark, not letting anyone pour your drink when you're not watching, being offered a ride, etc. Actually I once had a close call after accepting a ride in broad daylight from a young-ish professionally dressed man driving a nice BMW in a small town in Germany. I had to jump out of the car when he stopped at a red light. Just saying.
OK, back to Edinburgh. Someone on this forum recommended the Inverleith Hotel and it was really nice, safe and quiet with extremely helpful staff, but it is about a 10-min bus ride from The Mound and the Royal Mile. It's right by the Botanical Garden, if that interests you, and it's walking distance to at least 3 pubs/restaurants and a coin laundry as well as a petrol station that has an ATM.
The RS guidebook lists quite a few places closer to the Royal Mile. The B&B / guest house type of accommodation really seems to be prevalent in Edinburgh. A friend of mine stayed at the hostel and she said it was noisy but other than that fine.
With just 2 days in Edinburgh, you could spend 2 days working your way from one end of the Royal Mile to the other. Not that you'd necessarily want to, but there's enough to see that you could -- the castle at the top of the hill and Holyrood at the bottom, with tons of attractions in between. The National Museum is huge; I could also imagine spending all of 2 days in there.
If you want to get out of the city, you can take the bus to Rosslyn Chapel, which has a nice café and gift shop and offers free tour commentary a couple of times a day. Plan at least an hour each way not counting waiting for the bus. If you buy a day pass for the bus, you can use it again in the evening to go somewhere for dinner.
Be prepared for rain and chilly temperatures, though the Scots often say September has the best weather of the year.