Undubbing works much the same for most games on most systems once you get to the point of games having file systems (so DS or newer, anything that comes on CD, DVD or floppy disc).
That is to say you open up the versions of the game in question, grab the files from the source/donor game, overwrite the destination (in most cases then people tend to want Japanese audio over non Japanese text) and rebuild the game/ISO/ROM if necessary.
For the PSP most use umdgen to fiddle with ISOs.https://www.romhacking.net/utilities/1218/
It should be able to import and export files without rebuilding the whole game but you do you. The PSP used various audio formats, though the big one is AT3 (ATRAC3). For the most part though look at file names, folder names, sizes and maybe compare the regions -- most times levels, most graphics, videos and more will be the same so what is different tends to be the script and the audio.
There are times it gets harder. These being things like the game has all the languages already in the game but you have to select it somehow (see Castlevania Portrait of Ruin on the DS), or repoint it to use it, and occasions where people localising the game did not localise all the dialogue or otherwise changed the game (in Japan voice acting is a popular thing, if translating a game it is another expense so not all games will have all things voiced again and the calls to it deleted from the game).
In the case of a game losing voice work when coming to another country then rather than undubbing a game many will instead port the script back to the host game.
There have also been occasions where the devs for whatever reason would rearrange all the audio between regions and in those cases you would want to understand how the audio format works well enough to overwrite things, or change the game to instead call for the sounds as they were in the donor region's game. This is also what you want to do for a partial undub -- say you wanted Japanese noises but normal English voice work.
Most consoles without a file system do not have voiced dialogue or songs, though songs might have changed between regions. In those cases it can be quite hard as you have to figure out how the game's audio engine works well enough to change things.