We want to identify the linear function.
Of course,
a linear function is going to be a line
The vertical line test is for understanding whether it is a function or not.
By vertical line test,
Picture 1 [passes]
Picture 2 [passes]
Picture 3 [fails]
Now, we can clearly see that Option B is the a straight line, hence a linear function.