The slope formula given two points is (y2-y1)/(x2-x1). Your first point is (0,0) and your second point is (5,10) so we can plug in those numbers to the slope formula and get (10-0)/(5-0) to find that the slope is 10/5 or 2. Now, to figure this out mentally, you have to understand that all slope is, is rise over run. Starting from (0,0), you can find the slope from any point by just doing y/x. One of your given points on the line is (0,0), so you know that for the second point, all you have to do is the x divided by the y