A stock index averages the prices of a basket of companies, so it measures the market rather than any one firm. The Dow Jones follows 30 large companies; the Standard and Poor's 500 follows 500, which makes it the broader measure. They are drawn on separate scales, the S&P on the left and the Dow on the right, because the Dow's numbers are roughly ten times larger.
On those scales the two lines almost coincide, which is the point: they are measuring the same thing. Prices barely moved through the 1970s, rose steeply from the early 1980s to 2000, then spent a decade going up and down without getting anywhere, before climbing again from 2009. The slider reads both indexes at a chosen year; the values are sampled from the book's figure.