without going deeply into the possible different needs, such as ALWAYS drinking water is required, but the borewater tank can empty for days if needed....
one float switch for each tank
one electric valve for the drinking water tank
connect pipe so the drinking water tank gets water first and any overflow goes to the borewater tank.
when the drinking water tank is full, shut off the valve and then all water goes to the borewater tank.
Once that is full, shut off the pump.
If the drinking water tank sits on top of the borewater tank, you could run out of drinking water quickly. if the borewater were on top, the dirty water could get into the drinking water.
What we did not review is the hysteresis. say, you want to allow the tanks to empty half way before signaling the pump to run. You would need two additional float switches.
lower starts the pump, upper shuts it off.
As was noted there is no demand for an Arduino that we can see.
You could do this with switches.
But, since this is an Arduino forum, maybe we can find a place to put one anyway.
got any ideas ? water temperature? water tank level ? keep track of how often the pump runs ?