If you rent out the 2nd mortgage house,then you can claim first mortgage and 2nd mortgage interest for rental income.
You can write off 100 percent of the interest you pay on up to $1.1 million of debt secured by your first and second homes and used to acquire or improve the properties. (That's a total of $1.1 million of debt, not $1.1 million on each home.) The rules that apply if you rent out the place.