General equation of line is

where m is slope and n is point on y-axis. So just use points in question to determine what m and n must be. Let me show you.
For A(0,1), put this point in

then you have

Hence

Now use second one that is B(1,5), then you get

since

. Finally you get

that is slope.
So you are right. It is D