Geometrical application of differentiation maximums and minimums

i really need help for these 2 questions

I need to use deriviation on these questions and the simplest answer would be the best ><>< thank you

a piece of wire 6 metres long is cut into two parts, one of which is used to form a square and the other to form a rectangle whose length is three times its width. Find the lengths of the two parts if the sum of the areas is a minimum.

and

A rectangular area is to be fenced and divided into six rectangles by one dividing fence parallel to its length and two fences parrallel to its breadth. If the total length of fencing available is 120m fine the maxium possible area.