The slope formula is (y2 - y1)/(x2 - x1). It doesn't matter which one you use as x1 or x2 and long as you use the same order for the y's.
After plugging these 2 points in the formula, you get (24-4)/(5-1) = 20/4 = 5. Therefore, the slope is 5.
Hope this helped! Let me know if you need further assistance! Message me or comment under this post.