I think the only way Britney will be able to re-gain custody of her children is by turning her life around. She needs to prove to the courts that she's responsible and not get caught going out at all hours clubbing, drinking, and drugging. She needs to follow each court order to the "t", whether it be following through and going to AA meetings or random drug testing, she's got to suck it up and do it if she ever wants to get those boys back.
As for Jaime Lynn, she more than likely will be able to keep custody because it appears the boyfriend will be sticking around, and she'll have his help and the help of his family.