Perimeter is adding all the sides together.
2(3x+12) accounts for 2 of the longer sides.
2(5x+9) accounts for 2 of the shorter sides.
The perimeter equation can be...
2(3x+12) + 2(5x+9)
You can further simplify this by distributing the 2 to each bracket.
6x+24 + 10x+18
Add like terms.
16x + 42 is the equation for the perimeter.