A triangle pattern is shown below.

Three images are shown of a triangle patternThe first image shows one isosceles triangle. The base is labeled 6 and the other two sides are labeled 9. The second image shows two adjacent isosceles triangles. The original triangle is there, and now another upside down triangle is adjacent to it. Both triangles are the same size, with bases labeled 6 and the other two sides labeled 9. The third image shows three adjacent isosceles triangles. The two triangles from the second image are there, and now another right side up triangle is adjacent to the upside down one. All three triangles are the same size, with bases labeled 6 and the other two sides labeled 9.
The perimeter of each figure in the pattern is shown in the table below.

Figure Perimeter
1 triangle 24
2 triangles 30
3 triangles 36
Which equation relates the number of triangles in the figure (n) to the perimeter of the figure (P)?

(1 point)

P = 6n + 18
P = 6 n + 18

P = 9n + 6
P = 9 n + 6

P = 6n + 9
P = 6 n + 9

P = 9n + 12

The correct equation relating the number of triangles in the figure (n) to the perimeter of the figure (P) is:

P = 6n + 18