Suppose a wave travels from O to P.
At O, the variation of displacement y with time is y = a sin wt
At P, the displacement at P is given by