You **CAN** solve the problem your way, but the easy way is to use LaGrange’s method.

\(\displaystyle \text {Variables } x,\ y, \text { and } z \text { represent length of cuboid's sides.}\)

\(\displaystyle \therefore x,\ y, \text { and } z \text { are all positive.}\)

\(\displaystyle \text {Constant } s = \text {fixed surface area.}\)

\(\displaystyle \therefore s = 2(xy + xz + yz).\)

\(\displaystyle L= xyz - \lambda \{s - 2(xy + xz + yz)\}.\)

\(\displaystyle \dfrac{\delta L}{\delta x} = 0 \implies yz = 2\lambda x \implies xyz = 2 \lambda x^2.\)

\(\displaystyle \dfrac{\delta L}{\delta y} = 0 \implies xz = 2\lambda y \implies xyz = 2 \lambda y^2.\)

\(\displaystyle \dfrac{\delta L}{\delta z} = 0 \implies xy = 2\lambda z \implies xyz = 2 \lambda z^2.\)

\(\displaystyle \dfrac{\delta L}{\delta \lambda} = 0 \implies s = 2(xy + xz + yz).\)

\(\displaystyle \lambda = 0 \text { and } yz = 2\lambda x \implies yz = 0.\)

\(\displaystyle \text {By hypothesis, } y > 0 \text { and } z > 0 \implies yz > 0 \ne 0.\)

\(\displaystyle \therefore \lambda \ne 0.\)

\(\displaystyle xyz = 2 \lambda x^2,\ xyz = 2 \lambda y^2 = x = 0 \text { and } xyz = 2 \lambda z^2 \implies \)

\(\displaystyle 2 \lambda x^2 = 2 \lambda y^2 = 2 \lambda z^2 \implies \)

\(\displaystyle x^2 = y^2 = z^2 \implies x = y = z.\)

Done.