Yes, you're kind of on the right track. Just as in a line equation(point-slope form), \(\displaystyle slope=\frac{y_{1}-y}{x_{1}-x}\)
y=f(x)
So, you have:
\(\displaystyle \L\\m=\lim_{x_{1}\rightarrow{x}}\frac{f(x_{1})-f(x)}{x_{1}-x}\)
We rewrite this formula in terms of h as \(\displaystyle h=x_{1}-x\)
Thus, \(\displaystyle x_{1}=x+h\) and \(\displaystyle h\rightarrow{0}\) as \(\displaystyle x_{1}\rightarrow{x}\)
Therefore, we can rewrite as
\(\displaystyle m=\L\\\lim_{h\to\0}\frac{f(x+h)-f(x)}{h}\)
Using your function \(\displaystyle f(x)=x^{2}\)
\(\displaystyle \L\\\lim_{h\to\0}\frac{(x+h)^{2}+x^{2}}{h}\)
Now, can you take the limit and find the derivative?.