What is the potential difference between X and Y in the diagram above if the…