After the work is done, you find that the engine has a serious problem. The engine is guaranteed and the junkyard will give you another one, but you need to pay for the labor to take the bad one out and put the new one in. It is a gamble when you buy a part from one place and hire someone else to install it. You can try to make the argument that the junkyard should be liable for your additional labor costs resulting from the engine being bad, but it may be difficult to win. If you bought the engine from the installer, you would have a better chance of arguing that the shop should stand behind both the part and the labor.
Rebuilt parts are less risky than used ones, but they are generally more expensive.
Now your car has a big dent. But in the case of the dent, the garage may not be liable, unless you can show that the garage was negligent by parking your car someplace where it was likely to be hit. Additional resources for advice on shopping for cars, getting credit, and resolving auto problems can be found in the appendices.