You can probably do this. The question is to ask your self is do you want to?
I did a trip from Madison WI to Orkney about ten years ago. We flew, Madison, St. Louis, London--Gatwick I think--Edinburgh, Inverness, Kirkwall. The last two legs were the same plane. We left at 3:30 PM and arrived in Kirkwall at 6PM the next day. We had time for dinner and then bed. And, BTW it was hard to find a place for dinner, so if you do this, think about making a dinner reservation. This was a second trip to Orkney for us, so we did not do all the sights a second time and included a visit to Hoy for family and Shapinsay because it was easy and looked interesting. If you are interested in the archaeological sites, you'll need at least two days on the Mainland of Orkney. But I would also want to see Eagles Tomb on South Ronaldsay, so that is another day. And maybe a day for enjoying other aspects of Orkney. That puts you 6 days in.
Sadly, I've not been to Shetland. It's on my list for another trip. The good news is that you can fly from Kirkwall to Lerwick in about 40 minutes. Or you take the overnight ferry. The return ferry is to Aberdeen. Of course, you could fly first to Shetland and then take the ferry or plane to Kirkwall. I would think that you would want to spend three days there, but others may have a better idea.
Let's assume, that you do Shetland and then Orkney. From Kirkwall you can fly to Inverness or take the ferry to Scrabster. In Scrabster, you can take the train or bus to Inverness. I would pick up a car and spend the night in Inverness. (BTW I would strongly recommend renting a car on Orkney. I suspect it is the same for Shetland.) The car that you rent in Inverness can easily be returned to Glasgow or Edinburgh. At this point we are ten days into your trip. You will want to get up early and drive to Ullapool and catch the ferry to Stornoway. You'll arrive early afternoon and have time to look around. This is day 11. Spend day 12 looking at the Calinish Stones and the Carloway Broch and catch the morning ferry on the 13th day to Skye. It will be a very long day and you can get to Glasgow that day.
But you see why I think you should pick....You are allowing enough time for the Western Isles. You could probably tighten up Orkney or do more with flights, but wouldn't it be better to go back for another visit? :)