There are two ways that we can know this.

First, we know it because that is how it is defined. This is like when we look at a production possibilities curve. One way we know that the curve represents the most efficient outcomes an economy can achieve is simply because that is the definition of a PPC. In the same way, we are told that the vertical line represents potential output.

Second, we can know this because of what we see on the graph. The vertical line is the aggregate supply curve. We know that the economy can only produce at a point where the aggregate demand curve crosses the aggregate supply curve. If the aggregate supply curve is vertical, there is no way for this crossing point (equilibrium) to be at a higher level of output (farther right on the horizontal axis) than the vertical line. Thus, we can see graphically that no greater output can be achieved in the long run.