When Tom was same age as Nill, Jeremy was $18$. And when Jeremy was same age as Tom, Nill was $16$. What is Nill's present age? 
When Tom was same age as Nill, Jeremy was $18$. And when Jeremy was
  same age as Tom, Nill was $16$. What is Nill's present age?

I'm having trouble with writing the correct equation. However, I will be showing my attempt. 
Let's call $T = \text{Tom}$, $J = \text{Jeremy}$, $N = \text{Nill}$.
(When Tom was same age as Nill, Jeremy was $20$) Translating to math:
$$J= 18 +(N+T)$$
and  no clue about how I found this
(When Jeremy was same age as Tom, Nill was $16$) Translating to math: 
$$N = 16+ (T+J)$$
Finally, we will have an equation that contains $3$ unknown. The thing I'm trying to get is how to make an equation for these questions?
Regards!
 A: 
When Tom was same age as Nill, Jeremy was 18. And when Jeremy was same age as Tom, Nill was 16. What is Nill's present age?

Let's take it slowly.  There are three periods of time. Present, when Tom was the age of nil, and with Jeremy was the same age as Tom.
Let $T, N, J$ be Tom's, Nill's, and Jeremy's (respectively) ages.
Let $T_a, N_a, J_a$ be their ages when Tom was the same age as Nill, and let $Y_a$ be how many years ago that was.
So:
$T_a = N$ and $J_a = 18$.  Also $T-Y_a = T_a; N - Y_a = N_a; J - Y_a = J_a$.
To get these in terms of $T,N,J$ (the present ages) we combine.  $J -Y_a = J_a = 18$ so $Y_a = J - 18$.  And $N = T_a = T-Y_a = T-(J - 18) = T - J + 18$.
So EQUATION 1:  $N = T- J + 18$.
Let $T_b, N_b, J_b$ be their ages when Jeremey was the same age as Tom, and let $Y_b$ be how many years ago that was.
So:
$J_b = T$ and $N_a = 16$.  Also $T-Y_b = T_b; N - Y_b = N_ab; J - Y_b = J_b$.
To get these in terms of $T,N,J$ (the present ages) we combine.  $N -Y_b = N_b = 16$ so $Y_b = N - 16$.  And $T = J_b = J-Y_b = J-(N - 16) = J - N + 16$.
So EQUATION 2:  $T = J- N + 16$.
So: $N = T- J + 18$ and $T = J- N + 16$.  Solve for $N$.
Well, simple substitution:
$N = (J - N + 16) - J + 18$
$N = -N + 34$
$2N = 34$ 
$N = 17$.  Solution.
It might be worth noting that in general you can not solve 3 unknowns with 2 equations.  And if we try to solve for $T$ and $J$ we find
$N = T- J + 18\implies 17 = T-J + 18 \implies J = T+1$
$T = J- N + 16\implies T = J-17 +16 \implies J = T+1$
So we still weren't able to solve all of them. Tom can be any age, and Jeremy must be one year older.
You can always reduce $n$ (linearly independent) equations with $m$ unknowns, down to one equation with $n-m + 1$ unknowns and the remaining $m-1$ variable all expressed in terms of these "base" $n-m + 1$ unknown variables.  These remaining variables may or may not dependent on all of the base variables and some of them might even be solved. But at least $n -m + 1$ of them will remain unsolved.
A: 
When Tom was same age as (current) Nill, Jeremy was $18$.
When Jeremy was same age as (current) Tom, Nill was $16$.

For the first statement, $T$ years later, the ages of Tom, Nill, Jeremy will be $T+N$, unknown, $T+18$ years respectively. $(1)$
For the second statement, $18$ years later, the ages of Tom, Nill, Jeremy will be unknown, $34$ and $T+18$ years respectively. $(2)$
$(1)$ and $(2)$ are two same points in time (because Jeremy's age), so at some point in time the ages of Tom, Nill, Jeremy will be $T+N$, $34$ and $T+18$ years respectively.
$N$ years before that point, the ages of Tom, Nill, Jeremy is $T$, $34-N$ and $J-N$ years respectively, which happens to be the present because Tom is $T$ years old and Nill is $N$ years old.
This implies that when Nill is $N$ years old, Nill is $34-N$ years old, or $N=34-N \Rightarrow N=17$.

*

*The first statement implies that when Tom was $17$, Jeremy was $18$ or Jeremy is always one year older than Tom.


*The second statement implies that when Jeremy was one year older than Tom now, Nill is $17$ (which happens to be the present), so Jeremy is always one year older then Tom, because the age difference never changes over time.
Those two conclusions are exactly the same, so it's impossible to know the ages of Tom and Jeremy.
A: Make up the table for three times: $t_1, t_2$ and now:
$$\begin{array}{l|c|r}
t_1 & t_2 & Now \\
\hline 
T_1=N & T_2 & T \\
N_1 & 16 & N \\
J_1=18 & J_2=T &  J \\
\hline
\end{array}$$
Now make up $4$ equations with $5$ unknowns:
$$\begin{cases} N-T_2=N_1-16=18-T \\ T_2-T=16-N=T-J \end{cases} \Rightarrow \begin{cases} T_2-T=N-18 \\ 
N-18=16-N \end{cases} \Rightarrow N=17.$$
