Anhydrous HF is a covalent compound and is strongly H-bonded. Therefore, it does not give free F- ions and hence AlF3 does not dissolve in HF. In contrast, NaF is an ionic compound and hence F- ions are easily available. As a result, it combines with AlF3 to form the soluble complex.
3NaF + AlF3 → Na3 [AlF3]
On bubbling gaseous BF3 , AlF3 is precipitated. It is because BF3 is a stronger Lewis acid than AlF3 . This is attributed to smaller size and higher electronegativity of Boron. As a result of this B has much higher tending to form complexes than Al. Therefore, when BF3 is added to the above solution, AlF3 gets precipitated.
Na3 [AlF6] + 3BF3 → 3Na[BF4] + AlF3 (s)