To find the length of each piece of pipe, we can set up the following system of equations:
Let x be the length of the longer piece of pipe.
Then, the length of the shorter piece of pipe is 4-x.
We know that the longer piece of pipe is 2/3 as long as the shorter piece, so we can set up the following equation:
x = (2/3)(4-x)
Solving this equation for x, we find that x = 8/5.
Therefore, the longer piece of pipe is 8/5 meters long, and the shorter piece is 4-(8/5) = 12/5 meters long.