Distinction between the congiuntivo prossimo and the congiuntivo presente
We have already said that the presente congiuntivo as well as the passato prossimo congiuntivo are used after verbs, conjunctions and idiomatic expressions which describe an emotional / subjective attitude towards the world because something is feared, desired, insecure. We have already said as well that the presente congiuntivo is used if the imagined actions / events are imagined in the same moment that they are happening (I am afraid that he is ill) and the passato congiuntivo is used if they are imagined after they have happened (I am afraid that he was ill). The same logic rules the use of the congiuntinvo and the trapassato di congiuntivo if the introductory verb is in a tense of the past.
In the sentences below from a logical point of view only one tense is possible, depending on whether the action must be described as finished in the moment of speaking or unfinished. Pay attention to the fact that the logic mentioned above is not only to apply in the case of the classical sequence of tenses, but with any kind of subordinate sentence.