How do I make it so that the rollover also exists for the right circle and not just the left circle

var x = 150;
var y = 200;
var d = 200;
var e= 250;

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(255,0,0)
  if (dist(mouseX, mouseY, x, y) < d/2) {
    background(0,255,0);
  } else {
    background(255,0,0);
  }
  fill(0,100)
  ellipse(x, y, d, d);
  ellipse(e, y, d, d);
    
}

you can say

  if (dist(mouseX, mouseY, x, y) < d/2.0 || 
      dist(mouseX, mouseY, e, y) < d/2.0 
           ) {

So you can check for both circles in one go.

|| means OR