I can't picture how pee would go through 2 walls and the 4 or so inches in between. Is your tub's skirt down to the floor or does it have claws? My tub is attached to the floor and is caulked between the tub and floor. The tub and wall around the tub is also calked. If yours is that way, I doubt the smell is coming from under the tub. If your tub is off the floor, I suggest you look to see.if there's something on the floor.
1) Is there a bad smell in the room, next to the bathroom, in which the dog peed next to the bathroom? It would also smell.
2) Have you checked to see if something is stuck in the drain pipe of the tub and sink? A plumber would have to check because the rotten something, if there is something stuck, is likely too far down the pipe to see.
3)Is it possible a rat or some other creature has died in between the walls?
4)Is the flooring around the toilet well sealed to the stool? If not, urine can seep under the floor.
5)Is the bathroom vent open and in good condition? Most vent through the roof. It's a small pipe, perhaps 2". If it's closed, the nasty air stays in the room.
I've experienced or know people who have experienced all of the above. Unless you can mop under the tub, I know no way to get rid of the odor if it has seeped into the room unless you can mop under the tub using a product made to eliminate pet odors.
If the odor is coming from the dog peeing on the wall in the neighboring room, you will have to open the wall and clean the space in between as well as both walls.
If you mean only the odor seeped into the bathroom, I doubt that would happen. If the urine penetrated the wall, you will need to cut out that part of the wall and replace it.
Another thought: walls are covered with baseboards. They would keep the urine from getting in between the walls.