Total Cost, $T = 4q +\dfrac{100}{q}$
When total cost becomes minimum, first derivative of $T$ becomes $0$ and second derivative at the minimum point will be positive.
Differentiating $T$ with respect to $q$ and equating to $0,$
$4 - \dfrac{100}{q^{2}} = 0\Rightarrow q = +5$ or $-5.$ Since, we can't have negative number of product, $q = 5.$
Taking second derivative, at $q = 5$ gives $\dfrac{200}{125} =\dfrac{8}{5} > 0,$ and hence $5$ is the minimum point.