Draw a right triangle A and label the sides appropriately as OPP, ADJ, and HYP with angle $\theta$ opposite side OPP, and HYP opposite the right angle. Next generate similar triangle B by multiplying each side of triangle A by $\displaystyle\frac{HYP}{OPP\times ADJ }$.
Triangle B has a hypotenuse $\displaystyle HYP\cdot \frac{HYP}{OPP\times ADJ}=\frac{HYP}{OPP}\cdot\frac{HYP}{ADJ}=\csc\theta\sec\theta$.
Its opposite side is $\displaystyle OPP\cdot\frac{HYP}{OPP\times ADJ}=\frac{HYP}{ADJ}=\sec\theta$.
Its adjacent side is $\displaystyle ADJ\cdot\frac{HYP}{OPP\times ADJ}=\frac{HYP}{OPP}=\csc\theta$.
This triangle is shown in the diagram below.

From the definition of $\tan\theta$ we have
$$\color{green}{\tan\theta}=\frac{opposite}{adjacent}=\color{green}{\frac{\sec\theta}{\csc\theta}}$$
We also see that
$$\sin\theta=\frac{opposite}{hypotenuse}=\frac{\sec\theta}{\sec\theta\csc\theta}=\frac{1}{\csc\theta}$$
And
$$\cos\theta=\frac{adjacent}{hypotenuse}=\frac{\csc\theta}{\sec\theta\csc\theta}=\frac{1}{\sec\theta}$$
Additionally, using the Pythagorean theorem we have the following identity
$$\color{blue}{\csc^2\theta+\sec^2=\sec^2\theta\csc^2\theta}$$
Now, using these new tools your first problem becomes
$$\frac{1+\tan^2\theta}{1+\cot^2\theta}=\frac{\sec^2\theta}{\csc^2\theta}=\bigg(\color{green}{\frac{\sec\theta}{\csc\theta}}\bigg)^2=(\color{green}{\tan\theta})^2=\tan^2\theta$$
And your second problem becomes
$$\begin{array}{lll}
\tan\theta+\cot\theta&=&\frac{\sec\theta}{\csc\theta}+\frac{\csc\theta}{\sec\theta}\\
&=&\frac{\sec^2\theta}{\sec\theta\csc\theta}+\frac{\csc^2\theta}{\sec\theta\csc\theta}\\
&=&\frac{\color{blue}{\sec^2\theta+\csc^2\theta}}{\sec\theta\csc\theta}\\
&=&\frac{\color{blue}{\sec^2\theta\csc^2\theta}}{\sec\theta\csc\theta}\\
&=&\sec\theta\csc\theta
\end{array}$$