HINT $\;$ Work "generically", i.e. let the entries $\;\rm a_{i,j}$ of $\rm A\;$ be indeterminates and work in the matrix ring $\rm M = M_n(R)\;$ over $\;\rm R = {\mathbb Z}[a_{i,j}]. \;$ We wish to prove $\rm B = C$ from $\rm d B = d C$ for $\rm d = det A \in R, \;\; B,C \in M.$ But this is equivalent to $\rm d b_{i,j} = d c_{i,j}$ in the domain $\rm R = {\mathbb Z}[a_{i,j}]$ where $\;\rm d = det A \ne 0$, so $\rm d$ is cancelable, yielding $\rm b_{i,j} = c_{i,j}$ hence $\rm B = C$. This identity remains true over every commutative ring $\rm S$ since, by the universality of polynomial rings, there exists an eval homomorphism that evaluates $\;\rm a_{i,j}\;$ at any $\;\rm s_{i,j}\in S$.
Notice that the crucial insight is that $\;\rm d,\; b_{i,j}, \; c_{i,j}\;$ have polynomial form in $\;\rm a_{i,j}$, i.e. they are elt's of the polynomial ring $\;\rm R = {\mathbb Z}[a_{i,j}] = {\mathbb Z}[a_{1,1},\cdots,a_{n,n}]$ which, being a domain, enjoys cancelation of elts $\ne 0$. Working generically allows us to cancel $\rm d$ and deduce the identity before any evaluation where $\rm d\mapsto 0.$
Such proofs by way of universal polynomial identities emphasize the power of the abstraction of a formal polynomial (vs. polynomial function). Alas, many algebra textbooks fail to explicitly emphasize this universal viewpoint - leaving students often struggling with alternative dense topological approaches.
Analogously, the same generic method of proof works for many other polynomial identities, e.g.
$\rm\quad det(adj A) = (det A)^{n-1}\;$ by taking $\;\rm det\;$ of $\;\rm A\;(adj A) = (det A) \;I\;$ then canceling $\;\rm det A$
$\rm\quad det(I-AB) = det(I-BA)\;$ by taking $\;\rm det\;$ of $\;\rm (I-AB)\;A = A\;(I-BA)$ then canceling $\;\rm det A$
Finally. for our piece de resistance (of limits!), we derive polynomial derivatives purely formally.
For $\rm f(x) \in R[x]$ define $\rm D f(x) = f_0(x,x)$ where $\rm f_0(x,y) = \frac{f(x)-f(y)}{x-y}.$ Note that the existence and uniqueness of this derivative follows from the Factor Theorem, i.e. $\;\rm x-y \; | \; f(x)-f(y)$ in $\rm R[x,y]$ and from the cancelation law $\;\rm (x-y) g = (x-y) h \implies g = h$ for $\rm g,h \in R[x,y].$ It's clear this agrees on polynomials with the analytic derivative definition since it is linear and it takes the same value on the basis monomials $\rm x^n$. Finally, resisting limits once again, we formally prove Leibniz's product rule rule for derivatives:
$\rm\quad\quad\quad f(x)g(x) - f(y)g(y) = (f(x)-f(y)) g(x) + f(y) (g(x)-g(y)) $
$\rm\quad\quad\quad \implies \quad\quad\quad\;\; D(fg)\quad = \quad (Df) \; g \; + \; f \; (Dg) $
by dividing the first equation by $\rm x-y$, then evaluating at $\rm y = x$, i.e. specializing the difference quotient from the product rule for differences. Here the formal cancellation of the factor $\;\rm x-y\;$ before evaluation at $\;\rm y = x\;$ is precisely analogous to the formal cancelation of $\rm det A$ in the example sparking this thread.