Get them both to write a letter of apology to your dad and get your daughter to deliver them to him. Why they hell did they think that was an appropriate thing to do? If she's old enough to have the technology, she's old enough to face the consequences of letting cretins use it irresponsibly.
Get the phone back off the school and keep it from her until she's done enough mundane tasks of your choosing to demonstrate that she's mature enough to have earnt it back. I'm thinking carrying food shopping, babysitting for younger siblings, doing washing, ironing, maybe budgeting for a food shop - things that are essential parts of being an adult rather than just "punishment" tasks.
I have 13 dd and has just allowed her phone to be used by a boy to send dirty texts to my dad. He has also been on her fb and writin on there. I have reported her to fb and had her phone removed by the school. Her phone her responsibility. Is there anything else I can do?. I need her to learn this lesson as I feel it's in appropriate behavior She txt me as soon as the message was sent and said sorry