You are solving for two variables that have a product of the top section (-24) and have a sum of the bottom one (5).
-3 and 8 have a product of -24, and a sum of 5.