The “right way” to say that A and B are “almost the same” is context dependent. What works in ordinary conversation might not work in conversation among mathematicians, and almost certainly won't work in a mathematical journal paper.
As noted below, two of your forms are acceptable, but none of them are what I would say, which is: “A is nearly equal to B” or “The difference of A and B is tiny”.
In conversation, the forms “A is almost the same as B” and “A is close to B” are acceptable, but except in special contexts, none of the other forms are. That is, for each phrase, one could construct a special or artificial context where that phrase works; but if we assume more-general contexts, we can rule out several of the phrases, as follows. “A is almost B” suggests that A has been changing in value and now is almost B. “A is similar to B”, “A is like B”, and “A and B are alike” suggest that A and B are being compared by some unstated measure of similarity. (In general, “similar” and “like” do not connote a small arithmetic difference, but instead similar bit or digit patterns or other properties.) “A is alike B” isn't grammatical.
Mathematically, almost, almost all, and almost everywhere have specialized meanings; for example:
In set theory, when dealing with sets of infinite size, the term almost or nearly is used to mean all the elements except for finitely many.
“Almost all” is sometimes used synonymously with “all but [except] finitely many” ... or “all but a countable set” ... When speaking about the reals, sometimes it means “all reals but a set of Lebesgue measure zero” ...
In measure theory (a branch of mathematical analysis), a property holds almost everywhere if the set of elements for which the property does not hold is a set of measure zero
Given those specialized meanings, it's reasonable to avoid using almost for almost all other purposes.