Your tax filing status has NOTHING to do with how you complete the FAFSA for determining custodial vs non-custodial parent status.
Your son’s residency “some years” doesn’t matter one bit. The key is wher did he reside MOST in th 365 day’s prior to filing THIS FAFSA.
If your son resides more than 50% of the time for the year previous to the date of filing the FAFSA…with his mom…she is the custodial parent.
Here is Princeton info. They are very transparent when it comes to this.