It very common to merge two profiles with different surnames. The preferred LNAB (based on wikitree LNAB guidelines) should be the surviving profile, so you merge the other profile into it. I believe that doing it that way is preferred to first changing the LNAB and then merging because anytime you change the LNAB, I believe wikitree actually creates a new profile, adds all the content from the old profile, and redirects any links to the old profile to the new profile. That's the same thing that happens with any merger, but now you will end up with 3 profiles and 2 redirects instead of just 2 profiles and 1 redirect if you hadn't changed the LNAB before the merger.