Given that the chicken coop and the garden are the same length, we have the following equation:
[tex]3x+12=6x-16[/tex]So, we need to solve for x to find out the length of both of them:
[tex]\begin{gathered} 3x+12=6x-16 \\ \Rightarrow12+16=6x-3x \\ \Rightarrow28=3x \\ \Rightarrow x=\frac{28}{3} \end{gathered}[/tex]we have that x=28/3. Now lets substitute this value on the equations to get the length of the chicken coop and the garden:
[tex]\begin{gathered} x=\frac{28}{3} \\ \text{Chicken coop:} \\ 3(\frac{28}{3})+12=28+12=40ft \\ \text{Garden:} \\ 6(\frac{28}{3})-16=2(28)-16=56-16=40ft \end{gathered}[/tex]