Given that we want to buy the related shelf in the picture where $x$ is its width and $y$ is its height and $d$ is its depth.(in meters)
First i want to write an expression for the required area of wood to build the shelf so by looking at the picture I've concluded that its $3xd+2yd+xy$ ,because $3xd$ is the area of the 3 wooden boards bottom middle and top ,$2yd$ are the two sides and finally $xy$ is just the back.
Secondly i want to find the measurements of the shelf where i can save wood,i want the volume inside the shelf to be $1m^3$,and i'm looking to find the price of wood for it if for every $1m^2$ of wood costs $20$$.
For the second part i thought that this is a maxima/minima problem so i thought to use lagrange multiplyers method for this so letting $f(x,y,d)=3xd+2yd+xy$ to be the target function and $g(x,y,d)=xyd-1=0$ to be the constraint.
Is this correct?

It looks correct (if we are going to ignore thickness of the material). Using Lagrange multipliers is fine, but notice that you could instead look at $h(x,y) = f(x,y,1/xy) = 3/y + 2/x + xy$ and look for global minimum on open set $\{ (x,y)\in\mathbb R^2\,\mid\, x,y>0\}$ which will occur at some local minimum, because $h$ explodes to infinity when you approach the boundary. For this, you can simply calculate $\nabla h$ and find stationary points. You don't even have to check Hessian, since you are looking for global minimum, so you can just find minimum on the set of stationary points.
Edit: $\nabla h(x,y) = (-2/x^2 + y, -3/y^2 + x)$, so $\nabla h(x,y) = (0,0) \iff y = 2/x^2,\ x = 3/y^2.$ Substituting $y$ in the second equation, we get $x = 3x^4/4$ and since $x>0$, $x = \sqrt[3]{4/3}\approx 1.10064$. Returning to the first equation we get $y = \sqrt[3]{9/2}\approx 1.65096$. Finally, $$h(\sqrt[3]{4/3}, \sqrt[3]{9/2}) = 3\sqrt[3]{2/9} + 2\sqrt[3]{3/4} + \sqrt[3]{2/9}\sqrt[3]{3/4} = 3\sqrt[3]6\approx 5.45136.$$