Jeremy, memorize the following trig formulas that apply to right triangles:
sine = opposite/hypotenuse cosine = adjacent/hypotenuse tangent = opposite/adjacent
A simple mnemonic to help you remember those formulas is SOHCAHTOA, taken from the first letter of each of those words.
The leg opposite angle A is BC and the hypotenuse is AB. Using the formula for sine, sin A = opp/hyp = 8/17.
Similarly, the leg opposite angle B is AC, so sin B = opp/hyp = 15/17
The leg adjacent to angle A is AC, so cos A = adj/hyp = 15/17. The leg adjacent to angle B is BC, so cos B = adj/hyp = 8/17.
Again, for angle A, leg BC is opposite to angle A and AC is adjacent to angle A, so using the formula for tangent, tan A = opp/adj = 8/15.
Similarly, tan B = opp/adj = 15/8.