I have two servers which have different IPs and locations (but the same data). I want to set single domain DNS for them and when client send request to domain, DNS server offers nearest server due to latency or defined source IPs.
What you are looking for is DNS traffic management. This is a quite extensive and complicated situation in that you will most likely want to route the connection to the server with the lowest latency (closed by network) rather than the physically closest server. A wide number of DNS hosting providers offer traffic management on their DNS services but as these are complicated premium services they are priced accordingly. Without extensive experience in DNS, network management, and in the absence of the necessary infrastructure to support DNS traffic management it would be more economic to use one of these manged DNS services to handle the heavy lifting for you.