The rule is that when you compare two costs (whether it's comparing the cost of two cards, or the cost of a card with a fixed amount), then Cost A is less than or equal to Cost B only if, for each "type" of cost (Coins, Potions, Debt) it is equal or less (and it is only equal if all three are equal). So (3 Coins, 0 Potions, 0 Debt) is less than all of: (3 Coins, 1 Potion, 0 Debt), (3 Coins, 0 Potions, 1 Debt) and (4 Coins, 0 Potions, 0 Debt). It is not less than (2 Coins, 1 Potion, 0 Debt) or (0 Coins, 0 Potions, 8 Debt).
So Knights can only trash cards whose costs are 3, 4, 5 or 6 coins exactly, since those are the only costs which are greater than or equal to 3 coins and less than or equal to 6 coins. Engineer cannot gain itself, because 4 Debt is not less than or equal to 4 Coins.
Note that some cards specify cost in coins. In those cases, you ignore Potions and Debt entirely. If you use Salvager to trash a Fortune, you get 8 Coins because Salvager specifically looks only at the coin cost. If you use Forge to trash Royal Blacksmith, its 8 Debt cost is ignored and it doesn't add any coins to the value of the card you will gain.