己知点A(3,5,-7),B(-2,4,3),点P(2分之3,二分之五,z)到线段AB中点的距离为3,则z的值为