I'd would do the FOIL method and then distribute the 2. But you can also distribute first. Either way, they want you to expand it.
(x - 4)(x + 1) = x(x) + x(1) - 4(x) - 4(1)
Simplify
x² + 1x - 4x - 4
Combine like terms:
x² - 3x - 4
Now, bring back that 2 to distribute.
2(x² - 3x - 4) = 2(x²) + 2(- 3x) + 2(- 4)
f(x) = 2x² - 6x - 8