This is bit tricky. You need to have KYC done for both accounts. One with UAN is easily done through EPF portal. The another which does not have UAN need to have manual form filling and submission to be done. Employee needs to fill out transfer / withdrawal form, attaching kyc documents along with cancelled cheque. Account without UAN is difficult to withdraw, because when UAN were generated, all PF accounts were linked to UANs.
One thing which I am confused is how did the PF account number changed when UAN were allocated. I think this was treated as new employee and hence new number is generated.
One way is to link both the accounts and another way is to do separate withdrawals (one online and another with hard-copy). Both the ways are going to have challenges and definitely will take time and followups.