\(X\) is a fixed point \((3,0)\), \(Y\) is the point \((0,a)\). A line is drawn through \(Y\) and perpendicular to \(XY\), meeting the \(x\)-axis at \(Q\). On this line a point \(P\) is taken so that \(Y\) is the mid-point of \(QP\). Find the coordinates of \(P\).

Find the equation of the locus of \(P\) for varying values of \(a\).