Your HTML code does not indicate why or how you would want to combine these two tables.
Yes, HTML can create tables. But it is not a data base manager. It does not somehow know which objects belong together.
Please try to explain in plain English what you need to do.
Are these tables used to store numbers?
Or a bunch of important words?
Is it part of a spreadsheet?
Is it a photo album?
Is it a list of poems?
Os it a list of important dates in history?
In any case, understand the purpose of the table is critical to making major changes to anything other that just color and size.
If you have two disparate tables, but with a set of objects common to both, merge or join of the tables is more of a data base manager program, not a lot of HTML code.
Please explain why you need to do this?
Why not just start over and make a new table that has everything?