Hi and welcome to Just Answer!
Because the property is located in Maine - the gain is considered an income from Maine sources - and as such is taxable for that state. You will need to file nonresident tax return for Maine - and will be taxable only on that income.
If that income is passed to you - it will also be taxable on your North Carolina state income tax return - because you are a resident of North Carolina.
However - you will be able to claim a credit for taxes paid to other states on your North Carolina resident tax return - that will effectively eliminate double taxation.
Let me know if you need any clarification of help with other tax related issues.