The equation to find the slope is the y coordinate for the first point minus the y coordinate for the second point over the x coordinate for the first point minus the x coordinate for the second point.
(Note: the image is the equation for the slope. it doesn't always have to be
y1-y2 over x1-x2, it can also be y2-y1 over x2-x1 but those are the only 2 equations.
So, the equation is (4-3)/(1-0) because the y coordinates are 4 and 3, the x coordinates are 1 and 0.
(4-3)/(1-0)=1/1=1 so the slope is m=1
Now you do the same thing for the next problem:
(-1-0)/(-2-0)=1/2 so the slope is m=1/2