How to put texts at the end of curves?

 

please see the following figure:


Reason: