You're looking for a proxy, a way to divvy out requests between the two containers. The proxy will listen on those ports and then split the traffic to the two other containers (which are listening on 2 different ports)
Start looking into nginx reverse proxy, traefik, or caddy