How to handle dynamic xpath?

I also have this kind of problem with handling dynamic xpaths. Here