Ireland & Scotland is OK but you need to travel in a logical order. Too many people post planned itineries where they bounce around a country almost randomly.
So fly into Dublin - or Edinburgh. First alarm bell, I see you are in Detroit. Not an easy place to fly to UK/Ireland and needs connecting flights. My cousin lives in MI and flies over a few times each year. His luggage often doesn't arrive same day! So, make sure your layover is a good long one, or plan on spending the first few days in the arrival city in case you are waiting for bags.
from Dublin head north via Belfast in a reasonably direct manner. Stop wherever you feel like but do not think that Cork or Waterford is quick diversion! From Belfast take the ferry to Scotland, either the fast craft from teh city centre or the ordinary one from the port of Larne, both go to Cairnryan. From there another reasonably direct journey to Edinburgh. Glasgow, Perth, Stirling are all points within the sweep. Inverness, Glenfinnan, Shetland are not!! Or do the whole thing in reverse.
Car rental will be difficult. In Dublin they may allow you to cross into Northern Ireland but not go on a ferry to Scotland. In Edinburgh they probably won't allow you to go to on the ferry. But within the recommended "reasonable arc" train and bus options are varied, including tickets with the ferry as part of the journey.
You could try for an open jaw ticket which would be best use of time. If not possible there are cheap flights between Edinburgh and Dublin https://www.ryanair.com bear in mind that all checked bags have to be added to the cost of the fare and you have to check-in online and get a boarding pass before reaching the airport.