Which port the response is assigned to depends on the application. UDP is completely stateless, so after you release the packet, the only way the application can wait for a response is that it knows that the other end will send it. Depending on the UDP application, I would expect the response to be executed on the same port for simplicity - this is not the case for protocols such as TCP, which have an intentionally random (and high) source port.
To answer your second question, many routers, even low-cost home routers, perform stateful packet inspection (SPI). Something like this is likely to happen, but I should be fixed if I leave:
[Set stage with client, router, internet, server.]
- The client issues a UDP packet.
- The router sends a UDP packet to the Internet.
- The router remembers that the client sent the UDP packet to the server and set the mapping in its memory.
- The server sends a UDP packet, possibly to the same port.
- The router receives the packet and checks the mapping to find a client recently connected to the server.
- The router sends the packet to the client.
How it is implemented is specific to the router, I think, but this is my understanding of how it works.
source share