I don't know what "bog" is but 49208 is saying that it looks like stuff used to support (or glue?) the mast base and cockpit floor. If it came out of the transom drain plug, that's a mighty small ghost.
It looks like a piece of BONDO. this is commonly used in automobile body repair. Lasers have it in the mast step area. The hull portion of the mast step sits in a hole on the inside surface of the hull bottom. The space between the hole's structure and the bottom of the fiberglass mast step is filled with BONDO. With age and force the BONDO cracks and breaks loose. If this happens, as apparently it did, the mast step can move around and cause more damage.
To fix this you do need to cut a hole in the deck near the step and the mast step has to be rebuilt using strips of fiber glass fabric and WEST Epoxy. Not a difficult job.
One way to test the mast step is to poor water in the mast hole. If it drains down into the hull you have a problem.
If you don't repair it you will eventually tear out the mast step while you are sailing.