Can anyone walk me through the idea of "why's" in this method of proving a function is surjective I understand that a function $f:X\to Y$ is surjective iff $\forall \, y \in Y, \exists x \in X$, such that $f(x)=y$
Basically, every element of $Y$ needs to have at least $1$ pre image. 
Intuitively, I can show a function is surjective if I can show that Range = Codomain.
But given my limited skills, I'm not always able to find Range of every function. So while looking up alternatives, I watched a video on youtube, that first started off by expressing $x$ in terms of $y$ and then substituted this $x$ in $f(x)$ to show $f(x)=y$
I don't know how correct this method is, but if it's correct can anyone explain me what is going on in this method? And is this method always 100% going to be right?
EDIT : I don't remember the video, but I'll just give my own self made example to show what exactly happened.
$f: \mathbb{R} \to \mathbb{R}$ and $f(x)= 2x+3$ clearly this is an onto function. But let's show it, using that method.
$x= \dfrac{y-3}{2}$ and $f\left(\dfrac{y-3}{2} \right) = y$ and it then concluded that $f$ is a surjective.
 A: Just an example
Consider the function $x\in \mathbb{R}\to x^2 \in [0,\infty).$ That is, we have $y=x^2$ or in other words $x=\pm\sqrt{y}.$ 
Note that $x=\pm \sqrt y$ is not a function.
But we get that $f(\pm \sqrt{y})=y$ and thus we have shown that the function $f:\mathbb{R}\to [0,\infty), x\to x^2$ is surjective.
Comment
I don't know what video you have seen. But, in general, get $x$ in terms of $y$ can be very difficult or impossible. More difficult that show that $f$ is surjective by other methods.
Another example
The function $f(x)=x+\sin x$ is surjective as a function from $\mathbb{R}\to \mathbb{R}.$ We have $y=x+\sin x.$ But, how we get $x$ in terms of $y?$
A: The method you are describing can be summarized as

Solve for $x$ in terms of $y$.

Why does that work? Well if you can find an $x$ for every $y$ in the codomain then you have proved the function is surjective since that's essentially the definition of "surjective". 
As commenters have noted, that's not always easy, or possible algebraically. Nor s it necessary to show surjectivity.
Since you seem to know some calculus, here's another method. The function defined by
$$
f(x) = x + e^x
$$ 
from $\mathbb{R}$ to $\mathbb{R}$ is surjective since it takes on arbitrarily large negative and positive values and it's continuous. That means it takes on any value in between any two values in its range. There is no nice closed form algebraic way to solve $y = f(x)$ for $x$ in terms of $y$.
