They share the same 40 gallon? That seems far too small to me.
A 40 gallon (In my opinion) Is the absolute minimum for a single adult ball python.
I'd suggest keeping the younger male in the 40 gallon and getting either a 75 gallon or a 120 gallon for the 2 year old female.
Or even better, Instead of using fish tanks find a good 4x2x2 PVC enclosure and get one for each of them.