Imagine I got a production function like it : $$ \min\{x_1, x_2\} $$
How can I find the cost function?
Hint: Think how many units of $x_1$ and $x_2$ are needed to produce $q=1$ in order to minimize the cost. What about producing $q=2$? Can you generalize it?
In order to minimize the total cost, you want to use as few units of either input as possible. Imagine you wanted to produce $q$ units. You would need at least $x_1=q$ and $x_2=q$ (otherwise you wouldn't be able to produce $q$). Therefore, to produce $q$, you choose precisely $x_1(q)=q$ and $x_2(q)=q$. These are the derived factor demand functions. You only need to plug them in the cost identity
\begin{align} TC(q)&=w_1 x_1(q)+w_1 x_2(q)\\ &=w_1 q +w_2 q\\ &=(w_1+w_2)q \end{align}