In this paper, we consider the scattering of a time-dependent electromagnetic wave by an elastic body immersed in the lower half-space of a two-layered background medium which is separated by an unbounded rough surface. By proposing two exact transparent boundary conditions (TBCs) on the artificial planes, we reformulate the unbounded scattering problem into an equivalent initial-boundary value problem in a strip domain with the well-posedness and stability proved using the Laplace transform, variational method and energy method. A perfectly matched layer (PML) is then introduced to truncate the interaction problem with two finite layers containing the elastic body, leading to a PML problem in a finite strip domain. We further verify the existence, uniqueness and stability estimate of solution for the PML problem. Finally, we establish the exponential convergence in terms of the thickness and parameters of the PML layers via an error estimate on the electric-to-magnetic (EtM) capacity operators between the original problem and the PML problem.