We would like to get custody of the kids

We live in CA about to move to TX.
My husband’s ex lives in NC with the kids (16 and 14)
The custody agreement was extablised in CA when the kids were smaller and was never moved to NC.
My husband’s ex has lived in NC for at least 6 yrs now.
My stepson lived with my husband from 5th grade until 9th grade. in 2009 My stepson decided that he did not want to live with us anymore and my husband and his ex agreed to let my stepson move back with her. Worst mistake ever. My stepson now smokes weed, drinks, skips and gets suspended from school, got his girlfriend pregnant, fights with is mother and sister, is in the juvenile court system and they had a CPS case open because of everything going on with my stepson. My stepdaughter ( 14 yrs old) has recently started skipping school and is sexually active and started arguing with her mother. I know that since my husband and I have been together (2007) we and he have been trying to convince his ex to let my stepdaughter live with us and then when my stepson moved back with her and first started getting in trouble we were asking her to let him move back but she refuses. At this point the kids are on a road to nowhere and we do not think living with their mom is the best situation. We have tried to work with my husband’s ex from saying lets do a trial period to let them come for longer visits and she will not budge with anything. My husband pays her child support each month. She makes it very difficult to see the kids. There has been a couple of times where we bought tickets and she didnt put the kids on the plane. Just a really difficult person to deal with. What do we need to do to get the custody moved to NC so we can ask for a custody modification? What are the first steps of this process?