Equation of $AP$ is given by:
$$ y = (x+a)\tan\theta$$
Now find the coordinates of the points of intersection of this line with the given circle.
$$ x^2 + y^2 = a^2$$
$$ x^2 + (x+a)^2\tan^2\theta = a^2$$
$$ x^2 \sec^2\theta + 2a\tan^2\theta x + a^2(\tan^2\theta-1) = 0$$
This is a quadratic whose roots are the abscissae of $A$ and $P$. And we already know that the abscissa of $A$ is $-a$, we can easily find the other root using Vieta's formulae.
$$ P_x = \frac{a^2(\tan^2\theta-1)}{-a\sec^2\theta} = a(\cos^2\theta - \sin^2\theta) =a\cos2\theta$$
From the equation of the line,
$$ P_y = a(1+\cos2\theta)\tan\theta = a\sin2\theta$$
Now you know the coordinates of both $A$ and $P$. Thus you can write the equation of circle $C$, which will be:
$$ (x-A_x)(x-P_x) + (y-A_y)(y-P_y) = 0$$
$$ (x+a)(x-a\cos2\theta) + y(y-a\sin2\theta) = 0$$
Since this circle touches the y-axis, its intersection with the line $x=0$ must have a unique root.
$$ a(-a\cos2\theta) + y(y-a\sin2\theta) = 0$$
$$ y^2 -ya\sin2\theta - a^2\cos2\theta=0$$
Equating the discriminant of this quadratic to zero,
$$ a^2\sin^22\theta+4a^2\cos2\theta=0 $$
$$ 1-\cos^22\theta + 4\cos2\theta=0$$
$$ \color{red}{\boxed{ \color{black}{ \cos2\theta = 2 - \sqrt{5}}}}$$
For the second part of the question,
Tangents at $A$ and $M$ meet at $Q$. Thus, it is clear that the line $AM$ is the chord of contact of the point $Q$ with respect to the circle. Let $Q$ be some $(h,k)$
The circle's equation is (from above)
$$ (x+a)(x-a\cos2\theta) + y(y-a\sin2\theta) = 0$$
$$ x^2 + y^2 + 2ax\sin^2\theta - 2ay\sin\theta\cos\theta - a^2\cos2\theta = 0 $$
Equation of chord of contact is given by $T=0$
$$ hx + ky +a\sin^2\theta (x+h) - a\sin\theta\cos\theta (y+k)- a^2\cos2\theta = 0$$
$$ x(h+a\sin^2\theta) + y(k-a\sin\theta\cos\theta) + ha\sin^2\theta - ka\sin\theta\cos\theta - a^2\cos2\theta = 0$$
This is the equation of $AM$. But we know that $AM$ is nothing but the x-axis. Therefore, this equation must be equivalent to $y=0$
On equating the coefficient of $x$ and the constant term to zero, we get:
$$ h+a\sin^2\theta = 0$$
$$ ha\sin^2\theta - ka\sin\theta\cos\theta - a^2\cos2\theta = 0$$
Solve for $h$ and $k$
$$ h = -a\sin^2\theta $$
$$ k = -a \frac{\sin^4\theta - 2\sin^2\theta + 1}{\sin\theta\cos\theta} = -a \frac{(1-\sin^2\theta)^2}{\sin\theta\cos\theta} = -a\frac{\cos^3\theta}{\sin\theta} $$
Now you have the coordinates of $Q$ in terms of $\theta$
$$ \color{red}{\boxed{\color{black}{Q \equiv \left(-a\sin^2\theta, -a\frac{\cos^3\theta}{\sin\theta} \right)}}}$$
It is easy to show that $Q$ always lies on the curve $y^2x +(x+a)^3=0$. Just plug in the values of $h$ and $k$ into the locus and verify if the equation is correct.
Proof for $T=0$ being the chord of contact:
Keep in mind that this is for any conic (parabola/ellipse/hyperbola), and not just for circles.
For a general conic $ax^2 + 2hxy + by^2 + 2gx + 2fy + c = 0$,
At a point $(x_1,y_1)$, $T=0$ is written as $$ axx_1 + h(xy_1 + x_1y) + byy_1 + g(x+x_1) + f(y+y_1) + c = 0$$
I have already linked the proof for why this represents the equation of the tangent to the conic if $(x_1,y_1)$ lies on the conic, in the comments. We will use this result to prove that this represents the chord of contact of the point if $(x_1,y_1)$ lies outside the conic.
First, let me make it clear what I mean by chord of contact. Suppose there is a point $(x_1,y_1)$ outside the conic. Draw tangents to the conic from this point. There are clearly 2 such tangents possible. Let these 2 tangents touch the conic at the points $(x_2,y_2)$ and $(x_3,y_3)$ respectively.
Using the above property, the equation of the tangent to the conic at $(x_2,y_2)$ is given by:
$$axx_2 + h(xy_2 + x_2y) + byy_2 + g(x+x_2) + f(y+y_2) + c = 0 $$
Similarly, the equation of the tangent to the conic at $(x_3,y_3)$ is given by:
$$axx_3 + h(xy_3 + x_3y) + byy_3 + g(x+x_3) + f(y+y_3) + c = 0 $$
These 2 tangents intersect at $(x_1,y_1)$. This implies that $(x_1,y_1)$ lies on both these lines. Thus, we get:
$$\tag{1} ax_1x_2 + h(x_1y_2 + x_2y_1) + by_1y_2 + g(x_1+x_2) + f(y_1+y_2) + c = 0 $$
$$\tag{2} ax_1x_3 + h(x_1y_3 + x_3y_1) + by_1y_3 + g(x_1+x_3) + f(y_1+y_3) + c = 0 $$
Now, consider the linear equation
$$axx_1 + h(xy_1 + x_1y) + byy_1 + g(x+x_1) + f(y+y_1) + c = 0$$
From $(1)$ and $(2)$, $(x_2,y_2)$ and $(x_3,y_3)$ both lie on this line. But there exists a unique line passing through two given points. Therefore, this line must be the equation of the chord of contact, thus completing our proof.
Actually, $T=0$ represents another thing. For any point except the centre of the conic, it represents the polar of the point with respect to the conic. If you draw variable secants $PAB$ from a point $P$, then the locus of the point of intersection of the tangents to the conic at $A$ and $B$ is known as the polar of point $P$ with respect to the conic and the point $P$ is known as the pole of the polar with respect to the conic. You can prove this result by using a similar idea that I used to prove the chord of contact theorem.
There are several other notations as well for conics. These notations can be extremely useful in simplifying calculations in coordinate geometry problems like your question.