The circumference of a rectangle with an aspect ratio of 3: 2 is -6x,
The long side length is 3(a-6x)/5, and the short side length is 2(a-6x)/5.
The area is [6 (a-6x) 2]/25.
Let the sum of areas be y, then
y=2x^2+[6(a-6x)^2]/25
=[50x^2+6(a^2- 12ax+36x^2)]/25
=(266x^2-72ax+6a^2)/25
You can get guidance from both sides and do it yourself.