You may have used the definition of sine, but did not use or incorrectly used the Pythagorean Theorem to find p:
After solving this equation, substitute the value of p for the opposite side in the definition of sine.