Better start by going through the basic documentation first Finite element. There are lots of examples and guidelines in the online documentation.

From the code posted above, you only have one finite element space, namely, fespace Uh(Th,P1). Mixing fespaces becomes important when you deal with mixed finite element method, so it is important to be consistent with terminology.

Your error most likely comes because you have part of the left hand side and the right hand side under the same integral (the last integral in your problem Maxwell([...],[...])). These two have to be separated (see warning here Finite element).

Thank you! I have since gone through all the examples and a lot of documentation and think I know what I need to do now, would you say the following form would work?

A[Ex,Ey] = B[Exold,Eyold] + C[Exoldold,Eyoldold] +bc
Where A,B,C, and bc are matrices of varf’s, which I can then solve for A repeatedly in a for loop to loop through time?