My teacher told me that $\sqrt{x}=x^\frac{1}{2}$, but then why is this incorrect?
$$a^2+b^2=c^2$$
$$\sqrt{a^2+b^2}=c$$
$$(a^2+b^2)^\frac{1}{2}=c$$
Multiply in $\frac{1}{2}$
$$a^1+b^1=c$$
$$a+b=c$$
This seems totally correct to me, but we know that this is not the Pythagorean theorem anymore, so what is wrong?
In general it is not true that $(x+y)^{a} = (x^{a} + y^{a})$ for some $a$. So your argument when you jump from line 3 to line 4 is not valid. For $a = 2$ for example, we get: $(2+5)^{2} = 7^{2} = 49$ while $2^{2} + 5^{2} = 4 + 25 = 29$. Similarly you can show for yourself that the formula does not hold in general for $a = 1/2$.