I've been trying to rearrange the following to make R the subject and I've not had much luck. P, A, and theta are all known.

P+A = R + (A^2 + R^2 - (2*A*R*cos(theta))^(1/2))

Any help would be much appreciated.

The application is to find the real range of a reflector in a radar environment where R is the range of the reflector, A is the range of the aircraft, P is the path length difference between the direct aircraft signal and the reflected signal and theta is angle between the reflected path and the direct path.