I am reading the following theorem and its proof:
Theorem.
Let $\sigma : K\rightarrow K'$ be a field isomorphism and let $p(x)=a_0+a_1x+\dots a_nx^n\in K[x]$ be a non-constant irreducible polynomial. Let $p'(x)=\sigma (a_0)+\sigma (a_0)+\sigma (a_1)x+\dots +\sigma (a_n)x^n\in K'[x]$. If $u, v$ are roots of $p(x)$ and $p'(x)$ (in some appropriate extensions of $K$ and $K'$), respectively, then $\sigma$ can be extended into an isomorphism $\tilde{\sigma}:K[u]\rightarrow K'[v]$ that satisies the $\tilde{\sigma}(u)=v$.
Proof.
For each $u\in K$ we write $\sigma (u)=u'$ and we write the elements of $K'$ in the form $u'=\sigma (u)$ for some (exactly one) $u\in K$.
Firstly we notice that $p'(x)$ is irreducible.
Indeed, because if it was $p'(x)=(a_0'+a_1'x+\dots +a_k'x^k)(b_0'+b_1'x+\dots +b_m'x^m)$ with $k,m\geq 1$, then $p(x)=(a_0+a_1x+\dots +a_kx^k)(b_0+b_1x+\dots +b_mx^m)$, so it would be in contradiction to the assumption for $p(x)$.
Also, since the multiplication of a polynomial with a non-zero constant does not affect its roots, we can, without loss of generality, assume $p(x)$ to be monic (so also $p'(x)$).
The polynomials $p(x), p'(x)$ have the same degree, let $n$, so the $1, u, \dots , u^{n-1}$ consist a basis of $K[u]/K$, but $1, v, \dots , v^{n-1}$ a basis of $K'[v]/K'$.
So, we have that the mapping $\tilde{\sigma}:K[u]\rightarrow K'[v]$, that is defined by the relation $$\tilde{\sigma}(c_0+c_1u+\dots +c_{n-1}u^{n-1})=c_0'+c_1'v+\dots +c_{n-1}'v^{n-1}$$ for all the $c_0, c_1, \dots , c_{n-1}\in K$ it has the properties that are required by the theorem.
$$$$
$$$$
I haven't really understood the theorem... Could you explain it to me?
At the part:
Indeed, because if it was $p'(x)=(a_0'+a_1'x+\dots +a_k'x^k)(b_0'+b_1'x+\dots +b_m'x^m)$ with $k,m\geq 1$, then $p(x)=(a_0+a_1x+\dots +a_kx^k)(b_0+b_1x+\dots +b_mx^m)$, so it would be in contradiction to the assumption for $p(x)$.
do we have that this would be the form of $p(x)$ due o the isomorphism $\sigma$ ?
The polynomials $p(x), p'(x)$ have the same degree, let $n$, so the $1, u, \dots , u^{n-1}$ consist a basis of $K[u]/K$, but $1, v, \dots , v^{n-1}$ a basis of $K'[v]/K'$.
How do we know that these are basis?
So, we have that the mapping $\tilde{\sigma}:K[u]\rightarrow K'[v]$, that is defined by the relation $$\tilde{\sigma}(c_0+c_1u+\dots +c_{n-1}u^{n-1})=c_0'+c_1'v+\dots +c_{n-1}'v^{n-1}$$ for all the $c_0, c_1, \dots , c_{n-1}\in K$ it has the properties that are required by the theorem.
Why do we define $\tilde{\sigma}$ in that way? Why does it satisfy the properties of the theorem?
Yes, if $p'(x)$ were reducible, then applying $\sigma^{-1}$ would give a factorization of $p(x) = (\sigma^{-1}(a'_0) + \dots + \sigma^{-1}(a'_k)x^k)(\sigma^{-1}(b'_0) + \dots \sigma^{-1}(b'_m)x^m)$ (i.e., $a_i = \sigma^{-1}(a'_i)$ and $b_i = \sigma^{-1}(b'_i)$). Both of these polynomials would be nonconstant in $K[x]$ since $a'_k$ and $b'_m$ are both nonzero in $K'$, and the only element mapped to $0$ under $\sigma$ or $\sigma^{-1}$ is $0$ itself (because $\sigma$ and $\sigma^{-1}$ are isomorphisms).
If $1,u,\dots, u^{n-1}$ were linearly dependent, $u$ would satisfy a polynomial $q\in K[x]$ of degree less than or equal to $n-1$. But since $p$ is the minimal polynomial of $u$, this would mean that $p$ divides $q$, which is impossible, as $q$ has degree less than $p$. Moreover, $1,u,\dots, u^{n-1}, u^n$ cannot be linearly dependent, as $p(u) = 0$ gives a linear dependence relation between them. The same reasoning applies to $1,v,\dots, v^{n-1}$.
Recall that we wanted a map $\tilde{\sigma} : K[u]\to K'[v]$ such that $\tilde{\sigma}(a) = \sigma(a)$ for all $a\in K$ and such that $\tilde{\sigma}(u) = v$. Now every element of $K[u]$ is a polynomial in $u$ with coefficients in $K$, so a map satisfying those properties is $\tilde{\sigma}(\sum_{i = 0}^m a_i u^i) := \sum_{i = 0}^m \sigma(a_i) v^i$ (do you see why $\tilde{\sigma}(a) = \sigma(a)$ for all $a\in K$ and why $\tilde{\sigma}(u) = v$?).
It remains to verify that $\tilde{\sigma}$ is an isomorphism. First, we will show injectivity. If $\sum_{i = 1}^m a_i u^i$ is a nonzero element of $K[u]$, then we may assume that $a_m\neq 0$ and that $m\leq n-1$ (why?), so that $\tilde{\sigma}(\sum_{i = 0}^m a_i u^i) = \sum_{i = 0}^m\sigma(a_i) v^i$. But then $\sigma(a_m)\neq 0$, and since $1,v,\dots, v^m$ are linearly independent, $\sum_{i = 0}^m\sigma(a_i) v^i\neq 0$. Hence, $\tilde{\sigma}$ is injective.
To see that $\tilde{\sigma}$ is surjective, choose any element $\sum_{i = 0}^{n-1} a'_i v^i\in K'[v]$. It is easy to verify that $\sum_{i = 0}^{n-1} \sigma^{-1}(a'_i) u^i$ maps to $\sum_{i = 0}^{n-1} a'_i v^i$ under $\tilde{\sigma}$, so that $\tilde{\sigma}$ is an isomorphism (I'll leave it to you to check that $\tilde{\sigma}$ is additive and multiplicative).
EDIT:
Yes, $p$ is the minimal polynomial because it has $u$ as a root and is irreducible. The minimal polynomial of $u$ is the nonzero polynomial $p$ of smallest degree such that $p(u) = 0$. By irreducibility, no polynomial $q$ of smaller degree could have $q(u) = 0$. (If such a $q$ existed, by irreducibility of $p$ we can find polynomials $a$ and $b$ such that $ap + bq = 1$, but $a(u)p(u) + b(u)q(u) = 0\neq 1$, which is a contradiction.)
We want to be able to think of $K$ and $K'$ as the same field, since they are isomorphic. If you look at the "same" polynomial in each, their roots should also correspond (because the fields are the "same"). The mathematical way to say this is that the original isomorphism telling you that the fields $K$ and $K'$ were the same actually comes from an isomorphism $L\to L'$, where $L$ is a field containing $K$ and $L'$ is a field containing $K'$, so that indeed the roots of those polynomials can be thought of as the same. This is the same as saying you can extend the isomorphism $\sigma$ to an isomorphism $\tilde{\sigma}$ that restricts to $\sigma$ on the original field.
I'm not sure what your calculation is trying to show. Think of $a\in K$ as a polynomial in $u$, so that $\tilde{\sigma}(a) = \sigma(a)$, as $a$ is a constant. $u$ is also a polynomial in $u$, and by definition of $\tilde{\sigma}$, $\tilde{\sigma}(u) = v$.
Yes. Such an index exists because the polynomial was not zero, and we can take $m < n$ because there is a linear dependence between $1,u,\dots, u^n$, so that any time you have a polynomial with a power of $u$ higher than $n-1$, you can use that linear dependence to reduce that power to $u$ to lower powers.