When a lawn mower is backfiring through the carburetor it's usually caused by either the carburetor flooding out or the fuel mixture and air mixture are not correct.
You could also have a faulty spark plug that is not igniting the fuel properly and then causes the engine to have too much fuel left in the carburetor that is causing it to backfire.
Your flywheel timing may also be off and need fixed.
Most times though the backfiring through the lawn mowers carburetor is caused by a flooded carburetor where it gets too much gasoline.
The needle in the carburetor that shuts off the fuel could be stuck open allowing too much gasoline to flow through the carburetor.