How to attach two pieces of carpets in a reliable way?
The trade name for it is... wait for it... carpet tape.



This is a roll of 4" Carpet Seam Tape courtesy of wholesaletape.com and while although:


  This pressure sensitive tape applies quick and easy without the need of a "step on" hot iron. Made of a 42lb natural kraft paper with a fiberglass and cotton reinforced scrim it can join most carpet and wood surfaces.


I'd have to assume that most of the old carpets I've pulled out were hot ironed because it was nearly impossible to tear this stuff (it looked exactly like this), but maybe this works just as well.