Set $A = B = k[x]$ and figure out for yourself what that is a counterexample. (Hint: rigorously prove that there's no "universal polynomial" over $k$-algebras.)