Rather let f be an arbitary funct that rep displacement of a
particular point in a wave.
f=f(x,t)
Using newton 2nd law, and chain rule for partial derivative, u
get
d2f/dz2=(1/v^2)(d2f/dt2)
Where it should actually be partial derivative.( just that I cant
find the right symbol.)
Comparing with laplacian of B field and E field, u realize they
actually share the same constants, together with above result,
equate the constant=(1/v^2) as they are all in the same
mathematical form, you get the result.
c=1/(permittivity* permeability of free space)^0.5