Let #y# equal the length of side of triangle and # x# equal length of side of square.
So the perimeter of both the triangle and square will equal #3y+4x=26#,.............#[1]#
The area of the triangle and square combined will be
#sqrt3/4y^2+x^2#,............#[2]# ,the first term is the area of an equilateral triangle of side length #y# [from Pythagoras]
From #[1] , x=[26-3y]/4# and substituting this value for #x# into..#[2]# we obtain,
Total area#= sqrt3/4y^2+[[26-3y]/[4]]^2...............[3]#
Differentiating #[3]# using the chain rule, #2sqrt3/4y + 1/16d/dy[26-3y]^2#. #d/dy [26-3y]^2=2[26-3y][-3]= -6[26-3y]# and so we have ,
#Da/[dy]=2sqrt3/4y-6/16[26-3y]=0 # ,for max or min .
Tidying up ,# 4sqrt3y-78+9y =0,............#4]##, and factoring out #y#,
and so #y#=#78/[4sqrt3+9# #= 4.8969#, so perimeter of triangle = #3[ 4.8969]#
=# 14.6907 cm# and so the perimeter
the square is #26-14.6907=11.309 cm#.
From............. #[4], # #d^2A/dy^2= 4sqrt3+ 9 -78# which is negative and so this shows that the value of #y# found will maximise the area.