Are you sure you want to do this "5 days" in one then another "5 days" in the other? I just say that because...
- Most first time visitors vastly underestimate the time they need to allow for many things in these places: they're bigger than many people think; it takes longer to get around than they expect; and there is a LOT more to do and see than they thought there would be.
- Many first-time visitors are not entirely honest with themselves about how much usable time they will have – that's time on the ground, not including your arrival or departure days, and not counting any days that you pick up and move to another location. Once many people look hard at their plans and become more honest/realistic about their usable time, what they first were calling "5 days" may turn out to be just 2 or 3 actual full days.
Many people figure Ireland and Scotland look small, they're "kinda similar" and they're nearby. They expect places in Europe will be easily and efficiently tied together, and they figure they can knock out Ireland and Scotland in a week or so. If you have been thinking along these lines, you may want to reconsider.
Is this your first trip to these places? If not, ignore my comments above.
Here's how I would suggest you begin: start with specific dates that you would fly in and out (they don't have to be your actual dates, but having specific dates keeps you "honest" and forces you to look at realistic plans); so pick dates. Count your actual days, not including your arrival day nor your departure day. Toss out any day you fly somewhere (between Ireland and Scotland, for example). Plan on being in your departure city for your flight home (Dublin, Edinburgh or London) the night before your actual departure, so factor in a day possibly spent getting there. Every time you are picking up and changing locations, take some or all of that day out of your free time, too. Take that number, divide that by two (half for Ireland, half for Scotland). So how many full days does that leave you?
If that's alarmingly short, then you may want to consider what many people end up doing with their initial plan for "about 10 days between Ireland and Scotland"...pick one country, and save the other for another trip when you ca do it justice and get more out of both trips.
Both destinations are wonderful, and it would be painful to have less than a full week (10 days to 2 weeks is better) just for a brief taste of each. Sorry, I know that's not what yo want to hear.
If you really have your heart set on "doing" both, then ignore everything I've said. But...think twice before committing to both countries in roughly 10 days.