we know that
The variable x must be either degree zero or degree 1 and the variable y must be 1st degree in order to be a linear function.
case A) x=5
the variable x is first degree but variable y is zero degree---> is not a linear function
case B) y=2x
the variable x is first degree and variable y is first degree----------> is a linear function
case C) y=2x²
the variable x is second degree and variable y is first degree----------> is not a linear function
case D) y=x³
the variable x is third degree and variable y is first degree----------> is not a linear function
the answer is
the option B) y=2x is a linear function