The mistake is that you cannot substitute the deltas, as they refer to different quantities in each of the two equations. In the first equation, delta t refers to a time interval between two events that occur in different places in the unprimed frame, while in the second equation it refers to a time interval between two events that occur in the same place in the unprimed frame. Since they are referring to different quantities, you cannot substitute one for the other.
If you are confused by that, try the following analogy. Suppose you have two people, R and R', who are each of the same height, standing a long way apart, so that from the perspective of R, the other person R' seems to have shrunk by a half because they are so far away. Then if h represents the apparent height of R and h' represents the apparent height of R', you would have, from the perspective of R
h = 2h'
From the perspective of R' it is R who seems to have shrunk by a half, so you have
h' = 2h
Those two equations seem completely contradictory if you make the mistake of assuming that h in one of the equations means the same thing as h in the other. They don't. h in the first equation means the height of R as seen by himself, while h in the second equation means the height of R as seen by R' standing a long way away.