Person and Godhead do not belong to the same genus.
This is your argument, and it makes use of the transitive property of identity: "Jesus is God, and the Father is God, therefore Jesus is the Father."
The problem is that "Jesus" is a person, and "God" is an essence or substance. Let's look at a similar argument: "Joe is human, and Martha is human, therefore Joe is Martha." This argument fails for much the same reason. Joe is not the same sort of thing as human, just as Jesus is not the same sort of thing as God. The transitive property of identity requires the same sort of things being compared.