To develop this problem it is necessary to apply the oscillation frequency-related concepts specifically in string or pipe close at both ends or open at both ends.
By definition the oscillation frequency is defined as

Where
v = speed of sound
L = Length of the pipe
n = any integer which represent the number of repetition of the spectrum (n)1,2,3...)(Number of harmonic)
Re-arrange to find L,

The radius between the two frequencies would be 4 to 5,


Therefore the frequencies are in the ratio of natural numbers. That is

Here f represents the fundamental frequency.
Now using the expression to calculate the Length we have

Therefore the length of the pipe is 1.3m
For the second harmonic n=2, then

Therefore the length of the pipe in the second harmonic is 2.6m