Let’s start by looking at the coordinate plane. If both the x-axis and y-axis are labeled with integers from 1 to 30—including the points (1,1) and (30,30)—then there are 900 points total on the plane. 300 points lie below the line y = mx, so 600 points must be above the line. In other words, 1/3 of the points are on or below the line, and 2/3 of the points are above it. This means that the line y = mx has a slope of about 2/3 (you can graph this if you need to show your work). Since m is the slope, our equation for this line becomes y = (2/3)x.
Note that 2/3 is also the lower bound for m, because if the slope had a value lower than 2/3, it would pass through a different set of points, and the number of points beneath the line would be lower than the specified 300. Again, it might be helpful to graph this out as you’re working through it.
The next step is to find the upper bound for m. The line will still begin at the origin, but the idea is that you need to shift the end of the line slightly upwards to the nearest lattice point it can pass through completely. To continue working through this graphically, you’ll need to look at the points closest to 30 on the x-axis (so x = 28 or x = 29 could be a good starting point—get the corresponding y-values for those). If you plug in those x-values into the equation for the line, you find that y = 56/3 when x = 28 and y = 58/3 when x = 29. Note that these values are not fully reduced—for x = 28, all I did was take the equation y = (2/3)x, and I plugged in 28 for x, so (28*2)/3 = 56/3.
It turns out that the point (28, 56/3) is actually the one we want to continue working with. If you graph this, you'll see that this point is the closest to an integer point on the lattice. That integer point is (28, 19), which is what we will use to find the upper bound of m. Really, all you have to do is find the slope of the line that starts at the origin (0,0) and passes through (28,19), so the slope is 19/28.
The lower bound for m is 2/3 (which is the same as 20/30), and the upper bound for m is 19/28. The possible values of m should be in interval a/b, and to get that interval, we subtract the lower bound from the upper bound. The interval is 19/28 – 2/3 = 1/84, where a = 1 and b = 84. Adding these two values together, a + b = 1 + 84 = 85.
The link below has a couple of other methods you could use to approach this problem.