Teams $A$ and $B$ are playing in a basketball league where each game results in a win for one team and a loss for the other team. Team $A$ has won $\dfrac{2}{3}$ of its games and team $B$ has won $\dfrac{5}{8}$ of its games. Also, team $B$ has won $7$ more games and lost $7$ more games than team $A$. How many games has team $A$ played?