Since it's a linear equation and there's a constant rate (given in the problem), we can choose our x - axis to be the time and the y - axis to be height. We choose it that way because you are going up in the elevator. The more time in the elevator, the higher you go.
Finding this equation uses the point slope formula, y - y₁ = m(x - x₁). It can be done with slope-intercept, y = mx + b too.).
First we need to get the slope of the line. Choose any two points, but be consistent and choose two y points as well as the matching x ones. Here, we use x₁ = 2, x₂ = 4, y₁ = 45, y₂ = 75. Slope, m, is y₂ - y₁ / x₂ - x₁.
m = 75 - 45 / 4 - 2
= 30 /2
= 15
Next, we use the slope of 15 and either of the points to find the linear equation. Choose the same (2, 45) x-y pair above, but any point will work.
y - 45 = 15 (x - 2)
y - 45 = 15x - 30
y = 15x + 15
So the linear equation representing this table us y = 15x + 15.