You don't really need to do it that way. Select one of the border edges on the cube where the hole is , then Mesh > Fill Hole and that'll do it.
With two pieces of geometry, like in your example, the steps would be:
1) Move the two pieces close together
2) Mesh > Combine (you have to do this to merge verts)
3) merge the matching verts for each corner of the cube and plane.
"Terminat Bora Diem, Terminal Auctor opus."