T-Test Statistic Equation

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-r2)

and

t = (estimate b1 - actual b1)/ standard deviation of estimated b1

The first is for testing whether a correlation coefficient is zero or not.

The second is for testing whether a slope coefficient is a particular value or not.

Thanks you, much appreciated as always

Keep in mind, with a bit of algebra, the first t-statistic formula fits the classic: (estimate-hypothesized value)/ standard error.

t = (r * square root(n-2))/square root(1-r2) => (r-rho)/[(square root(1-r2))/(square root(n-2))]= (estimate-hypothesized value)/ standard error

… which fits the latter formula you gave