I have seen it said (Lebedev and Cloud, "Tensor Analysis", pg. 30) that given two non-zero vectors $\mathbf{x}$ and $\mathbf{y}$ the square matrix $\mathbf{A}$ is uniquely defined by the linear operation $\mathbf{Ax=y}$, such that for any arbitrary non-zero vector $\mathbf{u}$
$$\mathbf{Au=Bu}\rightarrow \mathbf{A=B} \tag{1}$$
The authors also phrase this by saying that if $\mathbf{A}$ is a second order tensor then (1) is true.
Ok, so then for any non-zero vectors $\mathbf{u}$ and $\mathbf{v}$ and the relation
$$\mathbf{Au=Bv}$$
May I just rewrite the RHS as follows
$$\mathbf{Au=BD(v)D(u)^{-1}u}$$
(Where the notation $\mathbf{D(q)}$ indicates a diagonal matrix whose diagonal elements are the elements of the vector $\mathbf{q}$ in parentheses.)
And, by (1), conclude that, if $\mathbf{A}$ is a second order tensor, then
$$\mathbf{A=BD(v)D(u)^{-1}}$$
Watch out with the statement $$ Au = Bu \to A = B. $$ As written, it looks like $$ \forall u(Au = Bu \to A = B), $$ and that is how you are interpreting it, too, but in fact, that is false (e.g., take $u$ a vector with all ones, and let $A$ and $B$ have the same columns, just permuted).
The correct statement is $$ \forall u(Au = Bu) \to A = B. $$