Sounds like the power outage caused a hardware problem which is not usual at all. Best to contact the NAS maker's support. This outage could have affected either the NAS, the computer, router, or any combo.
The error message indicated the driver letter P: is in use OR something else is triggering that same error message (happens).
Try assigning another Letter to that same path as a test.
Try directing P: to use a different path as a test.
Try a hard reset for the router and "everything" again.
Double Check in Disk Management that the drive letter P: has not been used (weird things can happen).
Have you tried Deleting and remapping everything from the Command Prompt?
Make a Restore Point first - Start - type in the Search box --> Restore
Find Create a restore point at the top and click on it.
Then try each of these A. - C. in turn as needed :
A. Right Click the Start button - type in --> CMD
Find at the top and Right Click on it - Run as Admin
At the command prompt enter these commands and hit Enter after each:
net use * /delete
(this command removes ALL)
net use Z: \server\share /user:username password
(add each back in)
B. Sometimes stopping and starting the browser helps - use the CMD (Admin) as indicated above.
net stop "Computer Browser"
(Wait for the command to execute then enter)
net start "Computer Browser"
C. Open RegEdit - right click Start - then select RUN - type in RegEdit
Locate this key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
Right Click on it and EXPORT - name it as you will in a location where you can find it if needed. <-- Very Important!
Then locate this still in the left panel --> MountPoints2
Right Click on it and EXPORT the same as above. <-- Very Important!
You can experiment with deleting ANY of them or ALL of them and Restarting then mapping again. You can even Edit a COPY of the EXPORT file so you can restore individual items as needed.
Here to help,
Rob