My textbook does not give an example of how to solve this problem so I'm not sure how to approach it. The problem asks, "Write the height h of the rectangle as a function of x." The back of the book gives the answer $h = -x^2 + 4x - 3$, which is a variation of the given function in the image, but I have no idea how to arrive at the answer. Any thoughts?

I don't know if I understand the request of the problem.
It seems a simple problem: I would say that $h=(-x^2+4x-1)-2=-x^2+4x-3$ in fact $h$ represents the distance between the parabola of equation $y=-x^2+4x-1$ and the line y=2.
Maybe you've to find the equation of the parabola from the graph. In this case you should impose that points $(1,2)$ and $(3,2)$ belong to the curve and that $2=-b/2a$ (vertex condition).