How to show that the curves $r=a(1+cosθ)$ and $r=b(1-cosθ)$ cut orthogonally? I tried to do the math by multiplying derivatives with respect to r and theta of both equation and then adding it. But I am not getting zero as expected. I think my method is wrong then.

It sounds like you have calculated $\frac{dr_1}{d\theta}$ and $\frac{dr_2}{d\theta}$ and then tried to multiple these two values together to get -1 like would normally be done in rectangular coordinates.
Note that $\frac{dr}{d\theta}$ is the rate of change or $r$ with respect to $\theta$ and is not the gradient of the curve.
You want $\frac{dy}{dx}$. Recall that $x=r\cos\theta$ and $y=r\sin\theta$ or: $x=f(\theta)cos\theta$ and $y=f(\theta)sin\theta$. Calculating derivatives gives:
$$\frac{dx}{d\theta}=f'(\theta)\cos\theta-f(\theta)\sin\theta=\frac{dr}{d\theta}\cos\theta-r\sin\theta$$
$$\frac{dy}{d\theta}=f'(\theta)\sin\theta+f(\theta)\cos\theta=\frac{dr}{d\theta}\sin\theta+r\cos\theta$$
Combining to get $\frac{dy}{dx}=\frac{\frac{dy}{d\theta}}{\frac{dx}{d\theta}}$ gives:
$$\frac{dy}{dx}=\frac{\frac{dr}{d\theta}\sin\theta+r\cos\theta}{\frac{dr}{d\theta}\cos\theta-r\sin\theta}$$
You could now divide top and bottom by $\cos\theta$ to write it using $tan\theta$ if you wanted to express it differently.
