Confusion I have regarding Einstein's 1905 derivation of LT

In his 1905 paper, Einstein derives the Lorentz transformation using the two postulates of SR;constancy of $c$ for all inertial frames and the Invariance of the laws of physics for all inertial frames.

I'll summarize his mathematical derivation and then ask one specific question about it.

So we consider two frames $(x,y,z,t)$ and $(\xi,η, ζ,\tau)$ in relative motion along the x-axis with velocity $v$, and we're interested in finding a spacetime transformation that relates thier coordinates.

We consider some arbitrary point $x'=x-vt$. This point is at rest in $(\xi,η, ζ,\tau)$ since it's moving with $v$, Therefore this point has $x',y,z$ coordinates that is independent of time, in other words the distance between that point and the origin of $(\xi,η, ζ,\tau)$ is constant.

We consider the following scenario: hit a beam of light from the origin of $(\xi,η, ζ,\tau)$ at $\tau_0$ arriving at the point $x'$ at $\tau_1$ and then being reflected and arrive at the origin of $(\xi,η, ζ,\tau)$ at $\tau_2$.

So that we have: $1/2(\tau_0+\tau_2)=\tau_1$. Since $\tau$ is a function of $(x,y,z,t)$ we have:

$\dfrac{1}{2}[\tau(0,0,0,t)+\tau(0,0,0,t+\dfrac{x'}{c-v}+\dfrac{x'}{c+v})]=\tau(x',0,0,t+\dfrac{x'}{c-v})$

Assuming that $x'$ is infinitely small then taylor expanding this equation and approximating it to first order we get:

$\dfrac{\partial \tau}{\partial x'}+\dfrac{v}{c^2-v^2}\dfrac{\partial\tau}{\partial t}=0$

Solving it then we have:

$\tau=a(t-\dfrac{v}{c^2-v^2}x')$

where $a$ is some unkown function of $v$ (in fact $a=1$).

Finally consider a beam of light emitted from $(\xi,η, ζ,\tau)$ at the origin, it's $\xi$ coordinate is given by $\xi=c\tau=ca(t-\dfrac{v}{c^2-v^2}x')$

It's given by $\dfrac{x'}{c-v}=t$ in $(x,y,z,t)$, plugging in for $t$ we get:

$\xi=a\dfrac{c^2}{c^2-v^2}x'$

He then states:

Substituting for $x'$ its value, we obtain $\xi=a\dfrac{1}{\sqrt{1-v^2/c^2}}(x-vt)$ ...

My question is:

1) the three equations $\tau=a(t-\dfrac{v}{c^2-v^2}x')$ and $\xi=c\tau$ and $x'=x-vt$ when combined together gives :

$\xi=c\tau=ca(t-\dfrac{v}{c^2-v^2}x')=a\dfrac{c^2}{c^2-v^2}x'$, since $x'=x-vt$ by plugging in we get:

$\xi=a\dfrac{c^2}{c^2-v^2}(x-vt)=a\dfrac{1}{1-v^2/c^2}(x-vt)$ not $a\dfrac{1}{\sqrt{1-v^2/c^2}}(x-vt)$ .

But He says

Substituting for $x'$ its value, we obtain $\xi=a\dfrac{1}{\sqrt{1-v^2/c^2}}(x-vt)$ ...

All these equations are copied from Einstein's original paper, So what is wrong with my calculations that does not make it match up with that of Einstein?

So what you wrote here isn't exactly what Einstein writes in the paper, and the difference there is what's causing your confusion (also he changes what he means by $\phi(v)$ halfway through the paper, which is the real problem). On page 7 of the pdf you linked, these equations appear:

$$\xi = a \frac{c^2}{c^2 - v^2} x'$$

$$\eta = a \frac{c}{\sqrt{c^2 - v^2}} y$$

$$\zeta = a \frac{c}{\sqrt{c^2 - v^2}} z.$$

Simplifying these naturally, we find

$$\xi = a \frac{1}{1 - v^2/c^2} (x - vt)$$ $$\eta = a \frac{1}{\sqrt{1 - v^2/c^2}} y$$ $$\zeta = a \frac{1}{\sqrt{1 - v^2/c^2}} z.$$

He then writes:

Substituting for $x'$ its value, we obtain $$\xi = \phi(v) \beta (x - v t)$$ $$\eta = \phi(v) y$$ $$\zeta = \phi(v) z$$,

where

$$\beta = \frac{1}{\sqrt{1 - v^2/c^2}}$$

If we compare these equations to the simplified expressions for $\xi, \eta,$ and $\zeta$ given above, we find they only make sense if we have

$$\phi(v) = a \beta.$$

If we put $\phi(v) = a \beta$, then the expressions are all consistent with what we derived previously (and with the correct expression you stated towards the end of your question).

He later proves that $\phi(v) = 1$, which gives us the known Lorentz tranformations.

The reason for this confusion is that on page $6$, Einstein writes "$a$ is a function $\phi(v)$ at present unknown", which would lead us to believe $\phi(v) = a$. It's just a little bit of sloppy notation - he's taking a factor of $\beta$ into the function $\phi(v)$ because it yields the simple result $\phi(v) = 1,$ which is cleaner than the result $a = 1 / \beta.$