What is the difference between equality and logical identity? I'm reading the book Introduction to Logic and to the Methodology of the Deductive Sciences by Alfred Tarski and he states:
"In this book we consider the notion of equality among numbers always as a special case of the general concept of logical identity. One should add, however, that there have been mathematicians who —as opposed to the standpoint adopted here— did not identify the symbol "=" occurring in arithmetic with the symbol of logical identity; they did not consider equal numbers to be necessarily identical, and therefore looked upon the notion of equality among numbers as a specifically arithmetical concept."
So what is the difference between "=" and "logical identity"?
 A: I expect that Tarski means by "logical identity" something close to "literally the same thing", which could be applied to numbers in arithmetic, sets in set theory, or anything else. 
Now imagine a mathematician X (not Tarski) who might say something like "a rational number is a pair of integers called numerator and denominator", so that "2/4" and "1/2" are different "rational numbers" because they have different numerators and denominators. Then X would still write "2/4=1/2" (they're a mathematician, after all), but might say the reason is that the criteria for rational numbers "a/b" and "c/d" to be equal in the sense of "=" is the arithmetic property that  $a*d=b*c$ (for whatever equality means for integers).
Tarski is saying "I'm not doing that mathematician X stuff. There's no arithmetic in my intended meaning of '='."
A: Consider a line segment with endpoints : (0,0) and (3,O) and a line segment with endpoints (0,4) and (3,4). 
You may say that they are " equal". 
But, in fact, they are not " logically equal", for they are not one and the same segment, they count as 2, not as 1 object. 
The two segments are equal ( in length) but not identical. 
A: At the outset, it should be remarked that the notions of identity and equality are so basic and peculiar that attempting to provide their closed definitions does not appear to be a promising method to come to grips with them. No doubt this should not give the impression that they are inexplicable or unanalysable. However, an extensive treatment would not only fall far beyond the bounds of one question, but presumably remain off-topic as well and better fit the Philosophy Stackexchange. So, I shall be content with the educated intuitions about them and focus on the distinctions that have motivated the question.
A fundamental schema of the theory of identity is Leibniz’s Law symbolised as a material biconditional:
$\forall F(Fx \leftrightarrow Fy) \leftrightarrow x = y$
which states that in case that an object $x$ and object $y$ have all and only the properties $F$ each other have, then $x$ and $y$ are identical and vice versa. The left-to-right implication, $\forall F(Fx \leftrightarrow Fy) \rightarrow x = y$, is the principle of the Identity of the Indiscernibles, which is related to qualitative identity. The right-to-left implication, $x = y \rightarrow \forall F(Fx \leftrightarrow Fy)$, is the principle of the Indiscernibility of Identities, which is related to numerical identity. Two objects are said to be qualitatively identical when they share one or more qualities. Two objects are said to be numerically identical when they coincide absolutely in every respect, that is, they count as one (hence the name). Qualitative identity allows to be partially common in qualities, whereas numerical identity requires totality. Whether numerical identity is to be regarded as the limiting case of qualitative identity is a matter of metaphysical dispute (see https://plato.stanford.edu/entries/identity-indiscernible/ for an overview). Logical identity is another name for, or one may prefer to say, equivalent to numerical identity, for it is thought to be inconsistent to take $x$ and $y$, whatever they denote, as distinct when they should count as one. Henceforth, I shall refer to numerical/logical identity merely as “identity”, since it is of our present concern.
Observe that equality in general, two constituents of which have something shared, is a kind of qualitative identity. That is why identity is treated as a stronger notion than equality, that is, identity implies equality, but the converse does not hold (likewise, equality is treated as a stronger notion than similarity). For example, a rope $7$ metres long and another rope $5$ metres long can be joined to be equal to (to share the numerical value of) a rope $12$ metres long, but the third rope can be hardly taken identical to the sum of first and second ones.
However, as an exclusive characteristic of mathematical contexts, object or value is all that is to have for the constituents of equality. Therefore, identity and equality, which comes in a variety of types in mathematics, too, can be coalesced into the familiar instruction "you can always put this in place of that without loss of anything mathematically significant (or salva veritate)" or briefly, “substitute equals for equals” (not requiring uniform substitution). Such a practice sensibly smooths things out for the working mathematician (notice that, in mathematics, identity takes on a sense of precision paralleling qualitative/numerical identity distinction; see https://en.wikipedia.org/wiki/Identity_(mathematics)).
Thus, $7 + 5 = 12$ can well be supposed, say, as an analysis of $12$ into $7$ and $5$, or a synthesis of $7$ and $5$ to $12$ (notice that the physical object “rope” does not occur anymore). Tarski gives the rationale that ‘$7 + 5$’ and ‘$12$’ designate the same number, though their inscriptions in symbols differ.
There is another face of Tarski's unification. As a requirement of strict formality, once one introduces a distinction, one ought to mirror that distinction by a specific syntactical device (e.g., a new symbol) and consistently employ it throughout. For example, when one distinguishes equality by definition from the equality simpliciter arising from a derived fact (e.g., the sum measure of the interior angles of a triangle is equal to $180^{\circ}$ in Euclidean plane geometry) or, a result of an operation, etc., one ought to employ a new symbol (like $\triangleq$, $\stackrel{\text{def}}{=}$) to represent equality by definition. So, Tarski would have to choose the advantages of introducing a distinction and its justification to be gained at the expense of its disadvantages (cluttering notation in an undergraduate text, digression, etc.).
Notice that he does not regard the distinction between arithmetic and geometric equalities as de minimis and demarcates them (p. 57):

$\ldots$ it would be recommendable to avoid consistently the term “equality”
in all those cases where it is not a question of logical identity, and
instead, to speak of geometrically equal figures as congruent figures,
replacing at the same time—as it is often done anyhow—the symbol “$=$”
by a different one, such as “$\cong$”.

After all, as a final note, you may wish to take a look at by Kevin Hartnett's article With Category Theory, Mathematics Escapes from Equality at https://www.quantamagazine.org/with-category-theory-mathematics-escapes-from-equality-20191010/.
A: In logic we have syntax and semantic. $$A \wedge B$$ and $$B \wedge A$$ have the same values (same truth table) but they are different expression, right?
Equality means literally equal syntactically. I would use "equivalence" for semantically the same. 
Ex. The following two propositions are different propositions but they have the same value -one would say same meaning - (assume people are either asleep or awake):
I) Everyone in the classroom is asleep.
II) No one in the classroom is awake.
