The Horizontal Line Test states that; if when drawing a horizontal line to the graph of a function, this line cuts the function at more than one point, the inverse of that function is not a function.
Applying the test for graphs attached:
We can conclude the inverse of graphs number 1, number 2 and number 4, are not functions because the lines cut in mere than one point.
Since he bought a few of each length. The only combination that works is when he bought 5 of the 4 ft long board so 4×5=20. Than he bought 3 of the 5ft boards 3×5=15. 20+15=35 ft worth of boards.