So in similar triangles the angles are the same, only the side lengths change so you have to use ratios to find this:
18:22
This is the ratio but it needs to be simplified.
Divide each side by 18 so that the right side is one:
1:1 2/9
now we use this ratio with 12cm where 12 is on the right. You multiply both sides by 12 and it becomes:
12:14 24/9
or
12:16 6/9
or
12:16 2/3
Therefore the base of the second triangle is 16 2/3 cm
Hope this helps :)