The equations of the given lines are:
$x \cos \theta - y \sin \theta = k \cos 2 \theta$ ..... $(1)$
$x \sec \theta + y \csc \theta = k$ ..... $(2)$
The perpendicular distance $(d)$ of a line $Ax + By + C = 0$ from a point $(x_{1}, y_{1})$ is given by $d = \frac{|Ax_{1} + By_{1} + C|}{\sqrt{A^{2} + B^{2}}}$.
For line $(1)$,$A = \cos \theta, B = -\sin \theta, C = -k \cos 2 \theta$. The distance $p$ from $(0,0)$ is:
$p = \frac{|-k \cos 2 \theta|}{\sqrt{\cos^{2} \theta + \sin^{2} \theta}} = |k \cos 2 \theta|$
$p^{2} = k^{2} \cos^{2} 2 \theta$ ..... $(3)$
For line $(2)$,$A = \sec \theta, B = \csc \theta, C = -k$. The distance $q$ from $(0,0)$ is:
$q = \frac{|-k|}{\sqrt{\sec^{2} \theta + \csc^{2} \theta}} = \frac{|k|}{\sqrt{\frac{1}{\cos^{2} \theta} + \frac{1}{\sin^{2} \theta}}} = \frac{|k|}{\sqrt{\frac{\sin^{2} \theta + \cos^{2} \theta}{\sin^{2} \theta \cos^{2} \theta}}} = |k \sin \theta \cos \theta|$
$q = |k \frac{\sin 2 \theta}{2}|$
$4q^{2} = 4 \cdot \frac{k^{2} \sin^{2} 2 \theta}{4} = k^{2} \sin^{2} 2 \theta$ ..... $(4)$
Adding $(3)$ and $(4)$:
$p^{2} + 4q^{2} = k^{2} \cos^{2} 2 \theta + k^{2} \sin^{2} 2 \theta = k^{2}(\cos^{2} 2 \theta + \sin^{2} 2 \theta) = k^{2}$.
Hence,$p^{2} + 4q^{2} = k^{2}$ is proved.