Length of wire:

L[x_] := Sqrt[10^2+x^2]  + Sqrt[20^2 + (30-x)^2]

L[0]

N[L[0]]

Derivative of length:

DL := D[L[x],x]

DL

Solve for where derivative = 0:

Solve[ DL==0, x ]

Check values including endpoints

N[L[10]]

N[L[0]]

N[L[30]]