It can be done without changing pivot point or origin, the thing is getting close before trying to snap. And doing the last step in Edit mode may be easier, especially if it's a more complex mesh.
In Object mode
align object close to the object/place you want to snap to.
Then turn on Snap, Snapping Edge or Vertex, Target Closest.
In Edit mode,
Press A to ...
You can do this with the snap tool.
First, modify snapping behavior to Snap to Face like so :
(toolbar on the top of the viewport screen)
In edit mode, select all the vertices you want to snap to the faces.
Then go into orthographic mode (numpad 5), align view to the "x" axis (numpad 3)
Type G (to move the vertices) and X to constrain to the x axis, ...
Correct me if i am wrong. It seems to me that the two edges you want to snap to eachoother are obsolete. The way it appears in the images you can remove those edgeloops, because the end result is a mesh that has the original shape of a cube, but it is broader in one end. Can you provide an image displaying the whole mesh?
You can enable Snapping by pressing the magnet at the top of the screen. If you click on the drop-down menu next to the magnet icon, you can change what Blender will snap to.
To toggle snapping via a keyboard shortcut, press Shift+Tab. Pressing Ctrl+Shift+Tab will bring up a pop-up menu for changing the snapping object.
If you don't want to toggle snapping,...
Look at TinyCAD, aside the for me only downside that the edges need to be in the same mesh, it should be the perfect solution for you. It comes with Blender and can be activated in the preferences.
In your case i then would:
Create a duplicate of the edge from the lower object with Shift+D
Leave it in place by pressing RMB
Separate by selection with P ...
The problem here is that you've applied the rotation transformations to your button, or rotated the button around in edit mode, causing the object's local axes to no longer line up with what you consider to be upright for your object.
To show you what I mean, here are the local axes for your button object:
And here are the normal axes for the face you're ...