The green pipe looks like temporary drainage IMO.
There's more of the current pipe, along with French drain type pipe next to the guys house.

So I bet the pool is in the way of the natural flow away from the house, and patio and/or house gutter water needs to be redirected around the pool to the back.
There's more of the current pipe, along with French drain type pipe next to the guys house.

So I bet the pool is in the way of the natural flow away from the house, and patio and/or house gutter water needs to be redirected around the pool to the back.