You can do this as follows:
${nome_pai}.equals("")?(${nome_mae}.equals("")?"":${nome_mae}):
${nome_pai}+(${nome_mae}.equals("")?"":" e de "+${nome_mae})
Explaining ...
The first part: If the name of the parent is empty, we will check if the name of the mother is empty or not, if both names are empty as you can see in the condition will not write this part, if he had only the mother's name, respectively, he had written the mother's name.
The second part: If the name of the parent is not empty, we write the name of the parent, and we verify if it has the name of the mother, if not, we did not write anything, with% concatenamos with the name of the mother.