Thanks for the question, Bruce!
First, to keep me out of trouble with our legal team, I have to tell you that your best answer on this question would likely be found with a CPA or other qualified tax professional who has knowledge of your overall situation. The plain truth is, this stuff can get pretty complicated and any one of a whole host of variables could make the general guidance on this subject not applicable to your situation.
Having said that, the general rules you’re seeking can be found in IRS Publication 936, Home Mortgage Interest Deduction. According to the information contained therein, it appears that you should be able to keep deducting your RV loan interest even after the loan on your primary residence is paid off. One is not contingent upon the other. Again though, please get with a tax professional to discuss your specific situation.
Finally, are you completely certain you want to pay off your primary mortgage first? From a pure mathematical perspective, it would seem that your RV loan is costing you more in interest given that it’s a higher rate and a newer loan. If you want to get the biggest bang for your extra payoff buck, the RV loan might be the place to get it.
Thanks again for your question. I hope this helps and I wish you all the best!