I am customizing a letter and I want to place a tabular with a multirow on the right side, here is a MWE:
\documentclass{article}
\begin{document}
\noindent
Text \\
\hrule
\hfill \begin{tabular}{r p{2cm}}
A & first line \newline second line \\
B & text
\end{tabular}
\end{document}
How can I set the column width of the p-column to the smallest possible value? I tried \width but it messes up the tabular.
I have seen people suggesting to use tabularx, but then I would have to specify the width of the table itself, and hfill doesn't properly align it to the right anymore. But I want both the table and the p-column to be the smallest width possible and the table aligned to the right!
EDIT: Also, A should be aligned with the first line of the multi-row.