I see you're trying to create loopholes where they don't exist. 🙂 You're not the first, and won't be the last.
When you started the refi of your primary residence is irrelevant. Doesn't matter if it took you 5 minutes, 5 months or 5 years to close on that refi either. All that matters is the closing date, and not much else.
Fact: You did not have any control or possession of the cash out money prior to closing on the rental property. Therefore there is no possible way you could have used that money towards the purchase of the rental. Period. End of story.
Opinion: If you claim the use of any of that money towards the purchase of the rental you closed on, before you closed on the refi, if/when the IRS audits you and catches it, it will be costly for you. It is not at all uncommon for what is referred to as a "paper audit" to occur 4 or more years down the road. (I've seen some audited as far back as 9-10 years, and a small few more than that.) If/when that happens to you, then you'll owe back taxes, fines, penalties and late fees for each and every tax year you claimed that interest. My advice is, don't do it.Rest assured that if the IRS comes knocking on this, you will lose the argument.
FACT: if you plan to purchase another rental using some of that refi money, don't wait to long. The IRS expects any reinvestment of a cash out to be done in a "reasonable" time frame.
OPINION: I've never been able to find any definition of what the IRS considers "reasonable". I would "expect" within 6 months to be reasonable. But the IRS may expect differently for all we know.