Given a set of coordinates in which the metric takes the standard Minkowski form
$ds^2 = dt^2 - dx^2 - dy^2 - dz^2$
you want to find another set of coordinates in which the metric also takes the same form
$ds^2 = d \bar{t}^2 - d \bar{x}^2 - d \bar{y}^2 - d \bar{z}^2$
Consider a linear boost along the x axis. We want to choose coordinates such that $\bar{x} = 0$ where $x - vt = 0$; the general solution is:
$\bar{x} = \gamma(x - vt)$
$\bar{t} = at - bx$
where $\gamma$, $a$, and $b$ are unknowns.
Then
$dt^2 - dx^2 = d\bar{t}^2 - d\bar{x}^2$
$ = (a dt - b dx)^2 - \gamma^2 (dx - v dt)^2$
$ = (a^2 - \gamma^2 v^2) dt^2 - (\gamma^2 - b^2) dx^2 + (\gamma^2 v - ab) dx dt$
so
$a^2 - \gamma^2 v^2 = 1$
$\gamma^2 - b^2 = 1$
$\gamma^2 v - ab = 0$
so
$a = \sqrt{1 + \gamma^2 v^2}$
$b = \sqrt{\gamma^2 - 1}$
so
$\gamma^2 v = \sqrt{\gamma^2 v^2 + 1} \sqrt{\gamma^2 - 1}$
$\implies \gamma^4 v^2 = (\gamma^2 v^2 + 1)(\gamma^2 - 1)
= \gamma^4 v^2 + \gamma^2 - \gamma^2 v^2 - 1$
$\implies \gamma^2(1 - v^2) = 1$
$\implies \gamma = \sqrt{\frac{1}{1-v^2}}$
Calculating a and b (exercise left to the reader) gives $a = \gamma$ and $b = \gamma v$, so that
$\bar{t} = \gamma(t - vx)$
completing the Lorentz transformation as expected.