What you have drawn is somewhat reasonable. I doubt a chloride would add to a carboxylic acid, but I understand you are trying to make an acid chloride. Since the starting material is also listed as the ester, I didn't know formation of the acid chloride was necessary and I did not expect that PCl5 would convert that ester to its acid chloride. I am not saying it couldn't, but it isn't high on my list of probable reactions. If one heated the heck out of it, then okay.
I am skeptical of the cyclization of the nitrile with the acid chloride. I prefer to simply proton the nitrile and add bromide to it to form a bromo imidate. Now the nitrogen is sp2 and I think better aligned to add to a C=O group, either an ester or an acid chloride (if I understand the question correctly).