Short answer: no.
You need to be a little careful with notation here. Sin, cos, and tan are function names. As such, we usually expect tan(sin) to mean "sin" is the argument of the tan function. It will only be equal to cos for some specific angles.
More carefully written, you have
... tan(θ) = sin(θ)/cos(θ)
Then, it is true that
... tan(θ)(cos(θ)) = sin(θ) . . . . . for cos(θ) ≠ 0
For this, the parentheses around cos(θ) mean it is a factor in the product whose other factor is tan(θ).
In general,
... tan(θ)(sin(θ)) ≠ cos(θ)