In one of the examples in the homework, there is (x-3)(x-4), then in the next step you have, x(x+4)-3(x-4). I don't understand where the (x+4) comes from, and I need help understanding this.

The expression x(x+4)-3(x-4) should be x(x-4)-3(x-4). The + sign was a typo.

The point here is that (x - 3) * whatever = x * whatever - 3 * whatever, and in this case the 'whatever' is the expression x - 4.