Connect two cubes without creating overlapping edges/faces
To follow your approach, you could:


K with C to constrain to the horizontal and Z to cut through.. create loops on both sides, 
In Face Mode, Select the inside faces, and CtrlE  Edge menu > Bridge Edge Loops




But, if your desk is mainly symmetrical, I would make only one side, and work on that, under a Mirror modifier, with 'Merge' checked.