Text this: Joint Sampling and Transmission Policies for Minimizing Cost Under Age of Information Constraints