As an extension to this problem, I am now considering the problem in $3d$.
The setup is a follows: You have four sound receivers (microphones) at known locations $P_1(x_1,y_1, z_1), P_2(x_2,y_2,z_2), P_3(x_3,y_3,z_3), P_4(x_4, y_4, z_4)$. A sound source located somewhere in space at $P(x,y,z)$ produces a blip (a short high-pitched sound made by an electronic device) at an unknown time $t_0$. The blip is received at the four receivers at times $t_1, t_2, t_3, t_4$ respectively. Use this information to determine the location of the sound source. It is assumed that the speed of sound is known.
My attempt:
If $c$ is the speed of sound, and if $d_i$ is the distance travelled by sound from the source to the $i$-th receiving station, then
$$ d_i = c \ (t_i - t_0) = a_i - k $$
where $a_i = c \ t_i $ and is known for $i=1,2,3,4$ and $ k = c \ t_0 $ and is unknown.
On the other hand, we have for each of the four stations:
$d_i^2 = (P - P_i) \cdot(P - P_i) $
There are four unknowns here which are $k , x , y , z $
Now it is a matter of solving these four quadratic equations for the four unknowns.
These equations are relatively easy to solve because by subtracting pairs of equations we get
$ -2 P \cdot (P_1 - P_2) + P_1 \cdot P_1 - P_2 \cdot P_2 = a_1^2 - a_2^2 - 2 k (a_1 - a_2 ) \tag{1} $
$ -2 P \cdot (P_1 - P_3) + P_1 \cdot P_1 - P_3 \cdot P_3 = a_1^2 - a_3^2 - 2 k (a_1 - a_3 ) \tag{2}$
$ -2 P \cdot (P_1 - P_4) + P_1 \cdot P_1 - P_4 \cdot P_4 = a_1^2 - a_4^2 - 2 k (a_1 - a_4 ) \tag{3}$
Equations $(1),(2),(3)$ are linear equations of hyperplanes. Solving the system produces a $4$-dimensional line of the form
$ X = (x,y,z, k) = X_0 + \lambda X_1 $
where both $X_0, X_1$ are known vectors $\in \mathbb{R}^4$, while $\lambda$ is a free parameter $\in \mathbb{R} $
To determine $\lambda$, substitue $X$ into any of the original four quadratic equations. This will give a scalar quadratic equations in $\lambda$ which produces two possible solutions.
The correct solution in which $t_0$ is less than the minimum of $t_1, t_2, t_3, t_4$.