Trouble, distress, ail can all mean to cause to be uneasy or upset.
Trouble suggests loss of tranquillity or serenity and implies disturbance of any sort that interferes with efficiency, convenience, comfort, health of body, or peace of mind.
Distress implies subjection to strain or pressure that causes such reactions as tension, pain, worry, or grief; thus, a cough distresses when it is tight and persistent; the formation of gas in the stomach distresses by its pressing bloating effect; a person is distressed in mind when anxiety distracts or crushes him; a person is financially distressed when he is in circumstances so straitened that he cannot pay his debts or satisfy his needs.
Ail implies that something has gone wrong or is the matter; in contrast to trouble and distress it is used only in respect to unspecified causes; thus, a cough may be said to trouble or to distress a person but not to ail him; one can be troubled or distressed but not ailed by something disturbing.