Relation between a recommender and a PhD applicant
You may consider two roles for the students in previous institute; one as a PhD student looking for topic and the other is a short-term research collaborator. As the recommender was not engaged in your PhD job, he cannot be PhD advisor. 

However, since the recommender was primary investigator (or head) of the project student worked in, the relationship is research collaborator or more focused, primary investigator in a collaborative research. Your output of the collaborative research with him as technical report, conference paper, or journal article would prove the relationship.

But I think student needs to convince the new graduate school that why did he fail/dismiss previous PhD.