Do the two heteroatoms represent the ligands of your complex? Are they both part of a single structure or are they two separate ligands?
To perform MMPBSA analysis, I suggest using AMBERTools, which you need to install on your computer. Here is the link where you can find instructions on how to perform such an analysis for a protein-ligand complex: https://ambermd.org/tutorials/advanced/tutorial3/py_script/section2.php
In general, you need to convert your trajectory to a format such as DCD or another format readable by AMBER. Additionally, you need to create three files containing, respectively, the entire complex, the receptor, and the ligand (in your case, NDP, UNK or both; depends on what these heteroatoms are for you)