Find the largest real number $x$ such that $$\left(\frac{x}{x-1}\right)^2 + \left(\frac{x}{x+1}\right)^2 = \frac{325}{144}.$$

Let's think step by step and output the final answer within \boxed{}.
user