In the reading on Correlation and Regression, we’re presented with two different t-test statistic equations. Cn anyone explain to me why and when you use one of these versus the other?

t = (r * square root(n-2))/square root(1-r^{2})

and

t = (estimate b_{1} - actual b_{1})/ standard deviation of estimated b_{1}