If the perimeter is known / given and is 6x, you can find the length of the unknown side by adding up the lengths of the other two sides and subtracting this sum from 6x:
6x - (x+3 + 2x + 4) = 6x - x - 3 - 2x - 4
Combining like terms, 3x - 7 represents the length of the unknown 3rd side.