Cash out refinance on primary home to pay off loan on rental loan

Hi,

 

If I have say 300K loan outstanding on my primary home and take 600K cash out refinance (300K paid off for old loan), can the 300K be used to pay off my property rental loan and interest on 300K be still claimed against rental income?