It seems that it is OK as it is a form of wishing a person something that is well.
As for the second question:
To me, it appears to be different as saying it after prayers is a habit and an innovation and it is also frequent, while saying it when someone tells you that he is fasting is very rare as people usually don’t disclose that they are fasting. Therefore it is not the same, at least to me.