Let us consider an incident wave $y_i$ travelling along positive x-axis in medium $1$ which is reflected($y_r$) and refracted(transmitted)($y_t$) across the boundary(at $x=0$) between medium $1$ and another medium $2$.
In this time-stamped video, he explains the reason as to why at $x=0$, $y_i+y_r=y_t$ which implies
$$A_i+A_r=A_t \;\;\;\;\;\;\;\;\;-1$$
However we know that energy of a travlling wave is directly proportional to the square of the amplitude. So one could argue that since $E_i=E_r+E_t$, therefore:
$$A_i^2=A_r^2+A_t^2 \;\;\;\;\;\;\;\;\;-2$$
Clearly $1$ and $2$ are different looking. Is there some flaw in my argument? If no, then are these 2 equations indeed equivalent?