Answer
$(x+5)(y-8)$
Work Step by Step
Upon inspection, we find that $y$ is common to the first two terms of the expression while $-8$ is common to the last two terms of the expression:
$xy+5y-8x-40$
=$y(x+5)-8(x+5)$
Since $(x+5)$ is now common to the entire expression, we factor it out:
$y(x+5)-8(x+5)=(x+5)(y-8)$
The expression cannot be factored further.