Effect of expanding plasma on propagation of electromagnetic pulses by laser-plasma interaction