Maths teacher takes out PM’s top science prize, with help from her dogs