Tackle differentiation questions in two parts: First put it into the simplest for possible for differenciation, then perform the differenciation.
So for this equation you should first expand the top brackets, do this using FOIL (multiply the first, outer, inner, then last numbers of each bracket). This should give (x3 +4x -3x2 -12)/2x. This is now in a form that you can easilt simplify further, just divide each term by 2x.
You should now have a much more approachable equation: f(x)= 0.5x2 - 1.5x + 2 -6x-1
Now differenciate this by multiplying the coeficient of x by the power of x, and minus one from the power: Axn goes to nAxn-1
If all goes to plan you should now have the answer: f'(x)= x -1.5 +6x-2
Remember if there isnt an x (So for 2 in f(x)) you can think of it as 2x0 , using the rule abole as n=0 this term will dissapear.