You will need to run g_energy command separately on both the .edr files, which will generate two plots in .xvg format. Then while visualizing the .xvg graph, you can view individual graph also and combine both in a one plot also.
After any run, whether it is equilibration and or production, you will have a file with extension '.edr'. Extract any energy term from there by the aforementioned protocol.