When playing 2 player on one Xbox and connected to Xbox live is there anyway to use two headsets?

No.

To be able to chat in a party, you need to be signed in with an Xbox Live account. On Xbox One, you need to have a Gold subscription to chat in a party. On the Xbox 360, you can only chat one-to-one without a Gold subscription.

In your case, only one account is signed in, therefore only one account is allowed to chat in the party. To be able for both of your boys to chat, the second child would need to sign in with an account that holds a valid Gold subscription.

I would recommend you set up a family using a parent account that holds the Gold subscription. That way you can easily share it with both your children without any additional fee and, on top, you would be able to play around with parental controls.

Here is a link on how to set up the family and related accounts!