The perimeter of the triangle is the sum of the lengths of its sides; therefore, since the side lengths are x, x + 2, and x + 4 cm and the perimeter is 51 cm, we have
[tex]x+(x+2)+(x+4)=51[/tex]Simplifying the left-hand side of the above gives
[tex]3x+6=51[/tex]subtracting 6 from both sides gives
[tex]3x=45[/tex]Finally dividing both sides by 3 gives
[tex]x=15.\text{ }[/tex]And we have the value of x! We now go on to find the value of the side lengths
[tex]x=15.\text{ }[/tex][tex]\begin{gathered} x+2=15+2 \\ x+2=17 \end{gathered}[/tex][tex]\begin{gathered} x+4=15+4 \\ x+4=19. \end{gathered}[/tex]Hence, the side lengths are 15cm, 17cm, and 19cm.