If both engines are pre 84, or both are post 83. The swap is easy.
In 1984 Mercury changed the transom bracket and introduced the integral Power Trim, replacing the external rams and inside boat pump system. With a bit more, disassembly, it is possible to interchange from one to another, and there have been examples shown on iboats in the past.