Let the sides of the polygon (which is a triangle, by the way) be x, y and z. The sum of x, y and z is the perimeter of the original poly, and this equals 18 cm.
Letting f be the scale factor, f(18 cm) = 12 cm. Then f=2/3.
The dilation reduces the size of the polygon by a factor of 1/3, producing a similar polygon which is 2/3 the size of the original one.
In each case we have 3 side lengths but no angles. We can use Heron's formula to obtain the area in each case. Look up Heron's formula. In one version of this formula, p is half the actual perimeter, meaning that p is 18 cm / 2 for the first triangle and 12 cm / 2 for the second.
The area of the first triangle would be
A18 = sqrt( 9(9-x)(9-y)(9-z) )
whereas
A12 = sqrt( 6(6-x*a)(6-y*a)(6-z*a) ), where a represents the dilation factor 2/3.
Then the ratio of the areas of the 2 triangles is
sqrt( 6(6-x*a)(6-y*a)(6-z*a) )
---------------------------------------
sqrt( 9(9-x)(9-y)(9-z) )