Noah, John, and Max have sold a total of 350 books. Max sold 45 more books than Noah. John sold 40 fewer books than Noah. How many books did John sell?
N = what Noah sold
N + 45 = what Max sold
N - 40 = what John sold
N + N + 45 + N - 40 = 350
3N + 5 = 350
3N = 350 - 5
3N = 345
N = 345 / 5 = 69
N - 40 = 69 - 40 = 29 = what John sold