It's perhaps worth reading about Lagrangian duality and a broader relation (at times equivalence) between:
- optimization subject to hard (i.e. inviolable) constraints
- optimization with penalties for violating constraints.
Quick intro to weak duality and strong duality
Assume we have some function $f(x,y)$ of two variables. For any $\hat{x}$ and $\hat{y}$, we have:
$$ \min_x f(x, \hat{y}) \leq f(\hat{x}, \hat{y}) \leq \max_y f(\hat{x}, y)$$
Since that holds for any $\hat{x}$ and $\hat{y}$ it also holds that:
$$ \max_y \min_x f(x, y) \leq \min_x \max_y f(x, y)$$
This is known as weak duality. In certain circumstances, you have also have strong duality (also known as the saddle point property):
$$ \max_y \min_x f(x, y) = \min_x \max_y f(x, y)$$
When strong duality holds, solving $\max_y \min_x f(x, y)$ also solves $\min_x \max_y f(x, y)$.
Lagrangian for constrained Ridge Regression
Let me define the function $\mathcal{L}$ as:
$$ \mathcal{L}(\mathbf{b}, \lambda) = \sum_{i=1}^n (y - \mathbf{x}_i \cdot \mathbf{b})^2 + \lambda \left( \sum_{j=1}^p b_j^2 - t \right) $$
The min-max interpretation of the Lagrangian
The Ridge regression problem subject to hard constraints is:
$$ \min_\mathbf{b} \max_{\lambda \geq 0} \mathcal{L}(\mathbf{b}, \lambda) $$
You pick $\mathbf{b}$ to minimize the objective, cognizant that after you pick $\mathbf{b}$, your opponent will set $\lambda$ to infinity if you chose $\mathbf{b}$ such that the constraint was violated (in this case $\sum_{j=1}^p b_j^2 > t$).
If strong duality holds (which it does here because it's a convex optimization problem where Slater's condition is satisfied for $t>0$), you then achieve the same result by reversing the order:
$$ \max_{\lambda \geq 0} \min_\mathbf{b} \mathcal{L}(\mathbf{b}, \lambda) $$
In this dual problem, your opponent chooses $\lambda$ first! You then choose $\mathbf{b}$ to minimize the objective, already knowing your opponent's choice of $\lambda$. The $\min_\mathbf{b} \mathcal{L}(\mathbf{b}, \lambda)$ part (taking $\lambda$ as given) is equivalent to the 2nd form of your Ridge Regression problem.
As you can see, this isn't a result particular to Ridge Regression. It is a broader concept.
References
I started this post following an exposition of Rockafellar.
Rockafellar, R.T., Convex Analysis
You might also examine lectures 7 and lecture 8 from Prof. Stephen Boyd's course on convex optimization.