The speed of a wave, V, is f *lambda. Where f is the frequency and lambda is the distance. If a new crest reaches the end every 4 secs; it takes 8s to cover the distance. Hence, f, which is the number of oscillations covered is 8s. So we have V = 8 * 5 = 40 ms^1.