What is the rule for the function shown in the table?

x -1 0 1 2
y -2 1 4 7

A. y = 1/3 x + 1

B. y = 3 x + 1

C. y = 1/3 x

D. y = 1/2 x + 1

B. y = 3 x + 1