understand how ahri works...
Tip 1 : every 9th spell she casts heals her depending on how many enemies she hit her orb will go green... so at that time (if she a good ahri)she will attack all the minions in a line with her orb to heal the maximum... she will be hesitant to use her ability on you as she wont get much heal if she casts orb on a single target i.e. you... so try to engage or force her to use her ability on you and dodge it.. this will reduce her sustain greatly
Tip 2 : dodging and continuous moving is key... orb can pass through units so you can only dodge that, but charm can hit minions also so use that to your advantage and try to stay behind minions if you think she's gonna engage. This continuous moving can be achievd by only last hitting minions... see, if you dont just last hit minions and keep hitting them to get em low, you will be standing at one place so keep running and be there for the last hit only
Tip 3 : she is very fragile at level 2... use her cooldowns to your advantage as most probably she will learn charm and orb in the first 2 levels and they have a relatively high cooldown at rank 1 , especially the charm. So once she misses that skillshot, thats your window to engage with her and reduce her health a little cz without low cooldowns she wont have any sustain as it will take her time and a lot of mana to reach those 9 spells and heal.
Tip 4: keep an eye on her mana bar... once it is low, is is quite safe for you to engage
Final general tip : Dodge skillshots, ward both sides of river as charm+jungler gank is fatal, use the cooldown window.
now cassiopeia is a little tricky to understand but here are some tips
Tip 1: like ahri, all of her abilities are skillshots except twin fang... so dodging is again the key
Tip 2: it is hard to use the cooldown window on her as her twin fangs refreshes if hits a poisoned target even at rank 1... so dont get poisoned please... and if she hits twin fangs without you poisoned, you have a really small window to poke and damage her a lot
Tip 3: you need to read about her and play her 3 times to counter her as her passive and twin fangs synchronize so much...
Tip 4: try to deny farm because it is hard to get her oom if she kills a minion with twin fangs, as that replenishes 3% of her maximum mana
Tip 5: she gains actual sustain after 9-10 minutes because twin fangs heal her then... try to get fed and deny farm before she gets 100 stacks (refer to the lol wiki to know what her stacks are about)
Final general tip: Call your jungler, avoid the poison and always keep a potion with you so that if you get really low and are poisoned, you may sustain the continuous damage by it untill you reach your turret , and most important - play her a little to counter her ...
Hope this helped you :)
Cheers mate.