How does Traefik choose from ingresses with coliding prefixes?

As you can read in this documentation:

Each path in Ingress must have the appropriate path type. Paths without an explicit pathType will not be validated. There are three supported path types:

ImplementationSpecific: With this path type, matching is up to the IngressClass. Implementations can treat this as a separate pathType or treat it identically to Prefix or Exact path types.

Exact: Matches the URL path exactly and with case sensitivity.

Prefix: Matches based on a URL path prefix split by /. Matching is case sensitive and done on a path element by element basis. A path element refers to the list of labels in the path split by the / separator. A request is a match for path p if every p is an element-wise prefix of p of the request path.

Here is also a link for examples in documentation.