The logic that I would follow is below:
- Get files (PDF files only)
- For each file
- Split the current name by underscore
- Convert to get new name using array items, underscores, and .pdf
- Rename file
I would probably also add in some checking to confirm the split function results in 3 items, but depends on whether you're sure the current naming convention is in the format 1234_FirstName_LastName for all PDFs.
I would also highly recommend you try this in a test environment first to ensure it works as expected, and if possible have a backup of the library you're running this across. Without knowing how many files you have, naming, etc. it's important that you weigh up the risks before running.
Below is the folder/file structure I used for the example:


And the result after running the flow:


Overview of the flow is below (more detail of each action below):

Get files (properties only)
I have a Filter Query to only bring back files (not folders) and only PDF files. I also set Include Nested Items to Yes.
FSObjType eq 0 and File_x0020_Type eq 'pdf'

Compose - Split Name
This splits the current name by underscore which should result in an array with 3 items:
split(item()?['{Name}'],'_')

Compose - New Name
This combines the array items from the split expression.
concat(outputs('Compose_-_Split_Name')[0],'_',outputs('Compose_-_Split_Name')[2],'_',outputs('Compose_-_Split_Name')[1],'.pdf')

Send an HTTP request to SharePoint
This renames each file using the output from the Compose - New Name action
Note that the /validateUpdateListItem will ensure that your file version won't be affected by the rename.
Note that you will need to specify the Title of your actual Library in place of Documents below.
_api/lists/GetByTitle('Documents')/items(@{items('Apply_to_each')?['ID']})/validateUpdateListItem
{
"formValues":[
{
"FieldName": "FileLeafRef",
"FieldValue": "@{outputs('Compose_-_New_Name')}"
}
]
}
