How would you repair this?

Weld up the crack and install a larger plate on it. Its under the carpet, nobody will ever know.
Also drill a small hole at each end of the crack before you weld it up. Hopefully that will stop the crack from more flexing
after you repair it. And adding a small strip to your reinforcing plate to make it a little wider to aid in a lasting repair.
Like others have stated it will never be seen when covered with carpet.