From which ancient poem does "the moon comes first by the advantage of the water" come?

This sentence should be "What's farthest and nearest", which comes from Eight Arrivals written by Li Zhi, a poet in the Tang Dynasty.

original text

Eight solstice

Tang Liye

From near to far, Qingxi from deep to shallow.

As high as tomorrow, the closest relatives are husband and wife.

translate

The farthest thing is the nearest thing, and the deepest and shallowest thing is Qingxi. The highest and brightest are the sun and the moon, and the rarest recently are the husband and wife.