Let's denote the length of the first piece of wire as \( x \) feet.
According to the problem:
- The length of the second piece is \( 3x \) (3 times the first piece).
- The length of the third piece is \( x + 12 \) (12 feet longer than the first piece).
Since the total length of the wire is 45 feet, you can set up the following equation:
\[ x + 3x + (x + 12) = 45 \]
Now, simplify the equation:
\[ x + 3x + x + 12 = 45 \]
Combine like terms:
\[ 5x + 12 = 45 \]
This equation can be used to find the length of the first piece.