as you might be known that the opposite sides of a rectangle are equal.
so,
the perimeter of a rectangle becomes
length + breadth + length + breadth
2 length + 2 breadth
2 (length + breadth)
apply the terms,
2 (3x +5 + 3x^2+ 6x -10)
= 2 ( 3x^2 +9x -5)
= 6x^2 + 18x -10 units.