Lets name the triangle ABC with B the vertex at the right angle (so, AC the hypotenuse) and AB the smallest of the two remaining sides.
As you said, we draw the height coming from the vertex B and perpendicular to AC. Lets name R the intersection of the height with AC.
So since both the triangles ABR and BCR are right-angled (because of the height), we can use Pytagoras. We have BR = 42. So, AB^2 = AR^2 + 42^2 so we rewrite it as AR^2 = AB^2 - 42^2 (formula 1). Same with BC^2 = RC^2 + 42^2 and we get RC^2 = BC^2 - 42^2 (formula 2).
Now, we know that BC = 7/3 * AB (here, it is what 3:7 means, in other words the proportion is 7/3). So we replace BC by 7/3*AB is the second formula and we get RC^2 = (7/3*AB)^2 - 42^2 = 49/9 AB^2 - 42^2 (formula 2b).
It is now that we use your height theorem : BR^2 = AR * RC. We square both sides and get BR^4 = AR^2 * RC^2. So 42^4 = (AB^2 - 42^2)*(49/9 AB^2 - 42^2) = 49/9 AB^4 - 42^2 AB^2 - 42^2 * 49/9 AB^2 + 42^4.
So we cancel the 42^4 and get 0=49/9 AB^4 - 42^2 AB^2 - 42^2 * 49/9 AB^2 = 49/9 AB^4 - 7840 11368 AB^2. So by factorization or quadratic equation you find AB^2 = 2088 or 0. We of course don't take 0 because a measure can't be 0. So AB= 45.695.
Of course we don't need AB so we look for AR and RC. From formula 1 we get AR = sqrt(AB^2 - 42^2) = 18 and from formula 2b we get RC = sqrt(49/9 AB^2 - 42^2) = 98. Done !
- Here my notation is not very good because I should be using "measure of" a side instead of the name of the side in my calculations but to make the text easier to read, I didn't do it -