Well, to the original poster, what it seems you are looking at is an attempt to install an outside-fit closet flange over a 3" bend. That's a normal procedure, but, as Terry said, this particular result is pretty strange looking. In part because that looks like a PVC flange over an ABS bend. And also because the photo of what's in the chase seems to me to have too long a tube coming out of the flange. It almost looks like someone took something like an inside-fit 4" flange with the long piece that has rubber towards the end of it, sawed that off, and then tried to slide it around the outide of the bend.
Meaning that the flange didn't start out as something like this:
But maybe instead started out as something like this, part of which was then sawed-off:
Regardless, most likely done by a clueless homeowner or handy-hack.
What you probably aren't familiar with and need to know to help you understand what is going on is that the way pipes are "glued" together involves a certain amount of chemical fusing of the plastics through the stuff that is applied to the surfaces of the pipes before they are slid together. It's not a traditional "glue" deal like you might do with wood. So PVC goes to PVC and the stuff you apply, first primer and then solvent, results in a fusing of the one PVC thing to the other PVC thing. Which is why the seal is waterproof. Same with ABS; indeed, one excellent way to bond ABS to ABS is with...ABS, which has been goopified by having had solvent applied to it. But I digress.
There is basically no reason whatsoever to try to adhere PVC to ABS in your setup. The installer just should have used an ABS flange and have been done with it. In the case where there really is some reason to glue one to the other (which reason currently escapes me unless someone needs to MacGuyver something in a hurry), Oatey makes some stuff called ABS to PVC Transition Cement, which is green. You put regular primer on the PVC and then the Transition Cement, and you put only the green Transition Cement on the ABS, then proceed as normal to connect the fittings.
So it's possible to do, but I have personally never seen it done anywhere. Probably because by the time you drive to whomever carries the Transition Cement and bring it back to the job site, you could have driven a shorter distance and just purchased a fitting of the proper material. If the joint in your home is faulty, it's likely because they just slapped it together the "normal" way for whatever material they thought they were working with, and it didn't fuse properly.
Where is your leak? Is water dripping off the curve of the bend and into the chase you photographed when the toilet is flushed? Is there a failure to seal between the flange and the bend? That would seem the most-obvious source of the leak. But it's not a big deal to remove the current flange and properly join a new flange of the appropriate material using the appropriate "adhesive" to make a proper seal. This is assuming that that's a proper closet bend there. Any competent plumber should be able to do so very readily. Then you just reinstall the toilet to the flange and when you flush, the stuff should just go down the drain. Ask your plumber to use an ABS flange with a stainless steel ring rather than an all-ABS one or one with a cheap, rustable metal ring.
Now, if by "leak" you mean that you are getting water on the floor and not in the chase below, then you probably just have a backup in the line that needs to be snaked out and the toilet reinstalled. Done.
Am I missing something, guys?