P varies directly with T and p=10 when T=500. When T=509, find T