The general fact is that iff (a ≥ 0 and b > 0) or (a ≤ 0 and b < 0). Yes, the inequality for b is strict because the denominator cannot become zero.

Applying this fact to this problem, we get (1) -x + 8 ≥ 0 and x - 7 > 0 or (2) -x + 8 ≤ 0 and x - 7 < 0. Variant (1) is equivalent to 7 < x ≤ 8, i.e., x ∈ (7, 8]. Variant (2) is equivalent to 8 ≤ x < 7, which is impossible.