Merge Vertices in UV-Editing
You could use the Stitch tool to stitch together the vertices along each edge.

Select two edges that you want to join then open the UV menu and choose the Stich option. (shortcut key =  V  ).

At the bottom of the UV editor view you will see a list of the Stich options.  Use the Snap option:  S key.

Left mouse button the validate Stich.

Select the other two edges, then  V  followed by  S  again.

Note that if you don’t want to move the vertices of the lower UV island you may have to use the Switch Island option:  Shortcut key =  I .

Left mouse button to validate.