Because this book has 40 pages, if all the pages are not torn up, the total is ((1+40)/2)*40=820.
Now because a piece of 74 1 has been torn off, the sum of the pages of the torn piece is 820-74 1=79.
Because the torn pages are continuous, it can be set to x pages and x+ 1 page.
So x+x+ 1=79, so x=39, x+ 1=40. So it's 39 or 40 pages, which is the last page.