Remove the legs from the Ikea lack table and cut a square out of the underside of the table with a straightedge. After removing the stuffing, apply wood glue, and wedge in a wood piece on each side of the hollowed out square.
Repeat these steps with the second table and then attach the two with hinges. Install gas springs so the table doesn’t slam, and reattach the legs. See it here.
Get the table from Ikea for $7.99.