Let y be the length of the third side. By the Pythagorean theorem,
y² + x² = 3² = 9
so that
y = √(9 - x²)
(taking the positive root because one expects length to be positive)
Then by the definitions of sine, cosine, and tangent, we have
sin(θ) = x / 3 → θ = sin⁻¹(x / 3)
cos(θ) = √(9 - x²) / 3 → θ = cos⁻¹(√(9 - x²) / 3)
tan(θ) = x / √(9 - x²) → θ = tan⁻¹(x / √(9 - x²))