Let v be the frequency of tuning fork.
Let, v1 and v2 be the frequencies of sonometer wire when its length is 30cm and 31 cm respectively.
The frequency of sonometer wire is inversely proportional to the length of the sonometer wire.
Therefore
v1/v2=31/30 ......(1)
From the above equation, it is clear that v1 > v2 . Since tuning fork produces 4 beats per second with sonometer wire for both lengths, therefore
v1>v2
v1-v=4
=> v1=v+4
and v1-v2=4
=> v2=v-4
thus, v1/v2=v+4/v-4 ......(2)
from (1) and (2)
v+4/v-4=31/30
(v+4)30=31(v-4)
After solving we get
v=244 Hz , is the frequency of the tuning fork.