Why don't these conversions of time between reference frames seem consistent? I am a student and due to school closures I am reading ahead in physics. I have been learning about relativity and I made up a problem for myself. You can see a diagram that I drew below:

The diagram shows car X travelling at $0.7c$ with respect to car B and $0.5c$ with respect to car A. Car A is travelling at $0.2c $ with respect to car B, where $c$ is the speed of light. 
This means, using Lorentz transform, 1 year on car X is equivalent to:
$$
\frac{1}{\sqrt{1-0.5^2}}=1.15
$$
1.15 years on car A.
And 1 year on car X is equivalent to:
$$
\frac{1}{\sqrt{1-0.7^2}}=1.40
$$
1.40 years on car B.
This means that 1.15 years on car A should be the same as 1.40 years on car B.
So if we were to use the Lorentz transform we should get the same answer but instead we get:
$$
\frac{1.15}{\sqrt{1-0.2^2}}=1.17
$$
We get 1.17 years on car B is the same as 1.15 years on car A. I don't understand what I have done wrong. Could you help me why this problem arises?
It is also worth noting that if I was to use a different method it would work. If I was to convert the time for car X into the time for car A then convert the time for car A into the time for car B, it would work. But I don't understand why this method works. In fact, I believe that method shouldn't work. This is because car X will be moving at 0.7c with respects to B still so 1 years on car X should be the same as 1.40 years on car B. 
Could you help me with this?
 A: 
The diagram shows car X travelling at 0.7c with respects to car B and 0.5c with respects to car A. Car A is travelling at 0.2c with respects to car B. Where c is the speed of light.

This is impossible. If car X is travelling at a velocity $0.7c$ w.r.t. car B and at a velocity $0.5c$ w.r.t. car A then according to the relativistic addition of velocities, car A would be travelling at a velocity $> 0.2c$. 
If the velocities of two objects are $u$ and $v$ w.r.t. an observer then the relative velocity of the first w.r.t. the second is given by 
$$\frac{u-v}{1-\frac{uv}{c^2}}$$
In your example, car A and car B are moving with velocities $-0.5c$ and $-0.7c$ respectively in the frame of car X. Thus, the velocity of A w.r.t. B will be given by 
$$\frac{-0.5c+0.7c}{1-{(0.5)(0.7)}}$$
which would be obviously not $0.2c$ like you assume. 
The morale of the story is that the Newtonian expectations of how velocities get combined don't remain valid in relativity and you need to be careful as to whether your assumptions are internally inconsistent in the purview of relativity. 
A: Although the OP mistakenly used galilean velocity-composition ($v_{AC}=v_{AB}+v_{BC}$) instead of special-relativisitic velocity composition ($v_{AC}=\displaystyle\frac{v_{AB}+v_{BC}}{1+v_{AB}v_{AC}}$),
using special-relativisitic velocity-composition alone does not resolve the key issue in the OP.


The key issue is
time-dilation factors are not multiplicative
Although $\displaystyle\frac{0.5+0.2}{1+(0.5)(0.2)}=\frac{7}{11}\approx0.6363...$,
$$\def\GAM#1{\displaystyle\frac{1}{\sqrt{1-{#1}^2}}}
\def\BGAM#1{\displaystyle\frac{#1}{\sqrt{1-{#1}^2}}}
\GAM{0.5}\GAM{0.2}\neq \GAM{\left(\frac{7}{11}\right)}
$$
Instead, 
$\GAM{0.5}\GAM{0.2} + \BGAM{0.5}\BGAM{0.2} = \GAM{\left(\frac{7}{11}\right)}$
Here it is in a form that you can copy-paste into wolframalpha [using implied multiplication]:
(1/sqrt(1-0.5^2))(1/sqrt(1-0.2^2))+(0.5/sqrt(1-0.5^2))(0.2/sqrt(1-0.2^2))-(1/sqrt(1-(7/11)^2))

Or, with an alternate set of velocities...
Although $\displaystyle\frac{0.7-0.5}{1-(0.7)(0.5)}=\frac{4}{13}\approx0.307692...$,
$$\def\GAM#1{\displaystyle\frac{1}{\sqrt{1-{#1}^2}}}
\def\BGAM#1{\displaystyle\frac{#1}{\sqrt{1-{#1}^2}}}
\GAM{0.5}\GAM{(\frac{4}{13})}\neq \GAM{ 0.7 }
$$
Instead, 
$\GAM{0.5}\GAM{(\frac{4}{13})} + \BGAM{0.5}\BGAM{(\frac{4}{13})} = \GAM{0.7}$
Here it is in a form that you can copy-paste into wolframalpha [using implied multiplication]:
(1/sqrt(1-0.5^2))(1/sqrt(1-(4/13)^2))+(0.5/sqrt(1-0.5^2))((4/13)/sqrt(1-(4/13)^2))-(1/sqrt(1-(0.7)^2))

More generally,
time-dilation factors are not multiplicative--there is an extra factor $$\gamma_{AC}=\gamma_{AB}\gamma_{BC}(1+v_{AB}v_{BC}).$$
These are easier to recognize if you work with rapidities (Minkowski angles), 
where $v_{AC}=\tanh\theta_{AC}$, 
$\gamma_{AC}=\cosh\theta_{AC}$, 
$v_{AC}\gamma_{AC}=\sinh\theta_{AC}$, 
etc...

Since rapidities are additive
$$\theta_{AC}=\theta_{AB}+\theta_{BC},$$
we have
$$\begin{align*}
v_{AC}=\tanh(\theta_{AC})
&=\tanh(\theta_{AB}+\theta_{BC})\\
&=\frac{\tanh\theta_{AB}+\tanh\theta_{BC}}{1+\tanh\theta_{AB}\tanh\theta_{BC}}\\
&=\frac{v_{AB}+v_{BC}}{1+v_{AB}v_{BC}},
\end{align*}
$$
which is the velocity-composition formula.
So, the time-dilation-factor is 
$$\begin{align}\gamma_{AC}=\cosh(\theta_{AC})
&=\cosh(\theta_{AB}+\theta_{BC})\\
&=\cosh\theta_{AB}\cosh\theta_{BC}+\sinh\theta_{AB}\sinh\theta_{BC}\\
&=\cosh\theta_{AB}\cosh\theta_{BC}(1+\tanh\theta_{AB}\tanh\theta_{BC})\\
&=\gamma_{AB}\gamma_{BC}(1+v_{AB}v_{BC}),
\end{align}$$
which is the formula used in the two numerical examples above.
Again, the key issue is that
time-dilation factors are not multiplicative.

(You may ask
Q: "So, what factors are multiplicative?"A: the Doppler factors: $k_{AB}=\displaystyle\sqrt{\frac{1+v_{AB}}{1-v_{AB}}}=e^{\theta_{AB}}$.)
(For a variation of this, have a look at my answer to similar question at
https://physics.stackexchange.com/a/326289/148184 )
A: The contradiction is in the setup. It is impossible that those three relative velocities can simultaneously be true.
You can't just add relative velocities together directly in special relativity. If an observer moving at velocity $v$ measures, in their own frame, a velocity $v'$ of some passing object, then a stationary observer would measure the velocity
$$u=\frac{v+v'}{1+\frac{vv'}{c^2}}$$
If car A is moving at $0.2c$ with respect to car B, and car X is moving at $0.5c$ in the same direction with respect to car A, then car X must be moving at roughly $0.64c$ with respect to car B, not $0.7c$.
