sol=Solve[{E1+E2==E3+E4,(1/(μ0 c0))E1-(1/(μ0 c0))E2==(1/(μ1 c1))E3-(1/(μ1 c1))E4,E3 Exp[I k1 d]+E4 Exp[-I k1 d]==E5 Exp[I k0 d],(1/(μ1 c1))E3 Exp[I k1 d]-(1/(μ1 c1))E4 Exp[-I k1 d]==(1/(μ0 c0))E5 Exp[I k0 d]},{E2,E3,E4,E5}]

R[d_]=Simplify[E2/E1/.sol[[1]]/.{k1->2π n1,k0->2π}/.{μ1->μ0,c0->1/(Sqrt[μ0 ϵ0]),c1->1/(Sqrt[μ0 ϵ1])}/.{ϵ1->(n1^2)ϵ0}/.{ϵ0->1,μ0->1},Assumptions->{μ0 ∈Reals,μ1∈Reals,c0∈Reals,c1∈Reals,k0∈Reals,k1∈Reals,d∈Reals,E1∈Reals,n1>0}]
T[d_]=Simplify[E5/E1/.sol[[1]]/.{k1->2π n1,k0->2π}/.{μ1->μ0,c0->1/(Sqrt[μ0 ϵ0]),c1->1/(Sqrt[μ0 ϵ1])}/.{ϵ1->(n1^2)ϵ0}/.{ϵ0->1,μ0->1},Assumptions->{μ0 ∈Reals,μ1∈Reals,c0∈Reals,c1∈Reals,k0∈Reals,k1∈Reals,d∈Reals,E1∈Reals,n1>0}]

Plot[((Re[T[d]])^2),{d,0,5}]

Simplify[Expand[((c0^2) (E^(I d k1)) (-1+(E^(2 I d k1))) ((μ0)^2)-c0 c1 ((E^(I d k0))+(E^(I d k1))) (1+(E^(2 I d k1))) μ0 μ1+(c1^2) (E^(I d k0)) (-1+(E^(2 I d k1))) ((μ1)^2))((c0^2) (E^(I d k1)) (-1+(E^(2 I d k1))) ((μ0)^2)-c0 c1 ((E^(I d k0))+(E^(I d k1))) (1+(E^(2 I d k1))) μ0 μ1+(c1^2) (E^(I d k0)) (-1+(E^(2 I d k1))) ((μ1)^2)/.d->-d)/.{μ1->μ0}]]