Before you hook anything back up you want to make sure you have solved the problem which caused the cables to overheat. There is no way a bad battery would cause that to happen while the battery is being discharged (sounds like that was the case as you were cranking the engine). If the battery is being charged, then a shorted battery could cause the cables to overheat. But, as you were able to charge both batteries to 12.6 volts it appears that neither battery was shorted.
It appears that something is shorted out in your electrical system and that damaged one of your batteries.
I would try using an ohmmeter to find the short. You''ll probably need to disconnect wires to isolate it. You''ll probably find a very low resistance between the positive and negative battery cables with the batteries removed. Then, the trick is to disconnect things until it goes away. Then you''ve found your problem.
It shouldn''t be hard to find. If the cables were as hot as you indicated, there''s a very low resistance somewhere.