Let
y -----> candle heigh in centimeters
x ----> burning time in hours
In this problem we have the ordered pairs
(5,22.5) and (17,16.5)
step 1
Find out the slope
m=(16.5-22.5)/(17-5)
m=-6/12
m=-1/2 -----> is negative because is a decreasing function
step 2
Find out the equation in slope-intercept form
y=mx+b
we have
m=-1/2
point (5,22.5)
substitute
22.5=-(1/2)(5)+b
solve for b
b=22.5+2.5
b=25
therefore
y=-(1/2)x+25
step 3
For x=7 hours
substitute in the equation
y=-(1/2)(7)+25
y=-3.5+25
y=21.5 cm