Denote the vertices as `A , B , C , D ` in the given order and denote the point of diagonals intersection as `O . ` Also, denote the parts of diagonals adjacent to vertices as `a , b, c , d , ` respectively. Suppose the acute angle is the angle `BOC ; ` if not, its cosine will appear negative and we'll correct.
The area can be expressed as
`1 / 2 ( ab + bc + cd + da ) sin theta = 30 .`
The side lengths (their squares) can be expressed using the cosine law:
`a^2 + b^2 + 2ab cos theta = 25 , `
`b^2 + c^2 - 2bc cos theta = 36 ,`
`c^2 + d^2 + 2cd cos theta = 81 ,`
`d^2 + a^2 - 2da cos theta = 49`
(We used the facts that the cosine of a complementing angle is `-cos theta ` while the sine is the same).
Now add the first and the third equations and subtract from them the second and the fourth:
`a^2 + b^2 - b^2 - c^2 + c^2 + d^2 - d^2 - a^2 +`
`+ 2 ( ab + bc + cd + da ) cos theta = 25 - 36 + 81 - 49 ,`
so, ` 2 ( ab + bc + cd + da ) cos theta = 21 .`
Now we can easily find `tan theta :`
`tan theta = ( sin theta ) / ( cos theta ) = ( 30 * 2 ) / ( 21 / 2 ) = 120 / 21 = 40 / 7 .`
Finally, the answer is 40 + 7 = 47.