If the two triangles are similar, then by definition we have that the quotient between two sides of a triangle is equal to the quotient between two sides of the second triangle.
We have then:
((3x) / (4x + 2)) = ((20) / (28))
Clearing:
3x = (20/28) * (4x + 2)
28 * 3x = (20) * (4x + 2)
84x = 80x + 40
84x-80x = 40
4x = 40
x = (40) / (4)
x = 10
answer
The value of x is 10