I will add a prayer to both recruits. I hope, that if they both stand up and are honest on this issue, they should be looked at favorably. They may get rank reduced or some other action, I just pray that's all and they can move forward.
I can't tell you what will happen at Captain's Mast, but there may be good news at this point. Since this happened in BC, and they told the truth at that time, Captain's Mast may just be a formality. Basically two rules were broken during BC. The first was your son had ibuprofen during BC, which is a violation, and he gave it to another recruit, which is a second one. Here is why I say there is good news. Both of them could have been kicked out of BC, no questions asked. Some recruits have been let go for far lesser things.
Captain's Mast is "non-judicial punishment" for misconduct. It isn't as scary as it sounds, especially when it appears to be a minor offense. There can/may be anything dismissal of the charge, to extra duties for a couple weeks, restrictions, and up from there. Since they both owned up to it when it happened that is a huge plus. As long as they both tell the same story and are upfront about it, it will be on the good side for them. I can't say what will happen, but try not to worry about it too much.
My son faced a Captain's Mast when he was stationed overseas. Long story short, there were three "involved," with one causing an issue. My son and the other that were left trying to fix what the other caused, were dismissed from the charges. Captain's Mast isn't there to toss people out of the Navy for minor violations.
Hugs to you, but I don't think it will be as bad as it sounds.