Expected 2D array, got scalar array instead
The error itself solves your problem. Just follow what it says. The predict() method takes a 2d array of values you want to predict on. Each item in the array is a "point" you want your model to predict on. So try,

lin_reg_2.predict(poly_reg.fit_transform([[6.5]]))


Here the input is a 2D array of shape (1,1).

Or as the error suggests:

lin_reg_2.predict(np.array([6.5]).reshape(1, 1))