There is an alternative way of doing this using symbology rather than labelling which might work for you:
- If you want different text for different features then add two fields to your data, one for your end text and one for you start text. This isn't necessary if you want just 'A' and 'B' at the ends of the lines.
- Symbolise your line layer and then add a new symbol layer -> set this to a marker line on the first vertex
- Set the symbol type to a Font Marker
- Either set the marker to 'A' or set the value to match the start field from your layers attribute table
- Muck about with size and rotation etc as you would a standard marker.
Repeat to add the end 'label'.

I am quite new at QGIS and the learning curve is still in its beginning.
– benoitespinola Aug 04 '16 at 13:20