Everything moves from outer to inner: multiply the first number (or letter) by the first letter in the second set of ( )'s, then take the first (d) by the outer number, then move to the second number, and so forth:
#1 step: d*5d
#2: d*-4
#3: -1*5d
#4: -1*-4
Now, put them all together in one long equation:
5d^2 -4d - 5d + 4
Now, solve for d