Private Link allows to access an Azure Cosmos account from within the virtual network or from any peered virtual network. Resources mapped to Private Link are also accessible on-premises over private peering through VPN or Azure ExpressRoute.
Read access from a virtual network first to learn the basic knowledge. Make sure you configured an Azure Private Link for an Azure Cosmos account.
By default, an Azure Cosmos account is accessible from any source if the request is accompanied by a valid authorization token. Trouble? Check firewall for Azure Cosmos DB.
You can connect by using the automatic or manual approval method.
So according to the picture you added to the question, both azsql1.database.windows.net
or 10.5.0.5
would be adequate.
When connecting to a private link resource using a fully qualified domain name (FQDN) as part of the connection string, it's important to correctly configure your DNS settings to resolve to the given private IP address. Existing Azure services might already have a DNS configuration to use when connecting over a public endpoint. This configuration must be overwritten to connect using your private endpoint. One way to archive this is to use Azure DNS as the DNS resolver - for example via configured DNS forwarder.