New x coordinate of a rotated line I need help finding the equation to find $x$
 
I work in GIS and I'm working on a script that uses the new x coordinate of a rotated line. I havent work with trigonometry in a long long time so I would much appreciate help with this equation.
I calculated the distance variable myself so it might be wrong $ \sqrt{(y_2 - y_1)^2 +(x_2-x_1)^2}$.
 A: You are looking at a standard (rigid) rotation

Given the point A with coordinates $(x_A,y_A)$ and the pivot C with coordinates $(x_C,y_C)$ and an angle $\theta$ acting clockwise the coordinates of point B are
$$\begin{align} 
  x_B & = x_C + (x_A-x_C) \cos\theta + (y_A-y_C) \sin\theta \\
  y_B & = y_C - (x_A-x_C) \sin\theta + (y_A-y_C) \cos\theta 
\end{align} $$
also confirm that $$\ell = \sqrt{ (x_A-x_C)^2+(y_A-y_C)^2 } = \sqrt{ (x_B-x_C)^2+(y_B-y_C)^2 }$$
A: Before anything shift all points so that $(36000,653000)$ becomes the origin. We do this by subtracting $36000$ from the $x$ coordinate, then $653000$ from the $y$ coordinate. Then the other point you know becomes $(-500,500)$. We will convert back but this makes things easier.
Rotations are easily done with complex numbers. Instead of considering $(-500,500)$ in the real plane consider the complex number $-500+i500$ in the complex plane. Geometrically, it's pretty much the same thing.
Let us write this number in exponential form.
$$-500+i500=\sqrt{500^2+500^2}e^{i(\pi-\arctan(500/500))}$$
We do not we want to change the modulus, or the distance from the origin, of this number. All we want to do is rotate it $\frac{\pi}{4}$ radians clockwise. That is subtracting $\frac{\pi}{4}$ to the argument of this number. Multiplying by $e^{-\frac{\pi}{4}i}$ does this.
So we end up with
$$\sqrt{500^2+500^2}e^{i((3/4)\pi-\arctan(500/500))}$$
After multiplying by $e^{-\frac{\pi}{4}i}$.
Let $\omega=(3/4)\pi-\arctan(500/500)$
By Euler's formula this becomes:
$$\sqrt{500^2+500^2}\left( \cos (\omega)+ i \sin (\omega) \right)$$
So the point of interest is:
$$(36000+\sqrt{500^2+500^2} \cos (\omega), 653000+\sqrt{500^2+500^2} \sin (\omega))$$
After reversing the subtractions on the coordinates that we originally performed.
$\arctan (1)=\frac{\pi}{4}$ for our pursues and the point of interest simplifies to:
$$(36000,653000+500\sqrt{2})$$
$$\color{blue}{x=36000}$$
Is it weird that $36000$ is the same $x$ coordinate for the point we took to be the origin? No, the point $(-500,500)$ forms an angle of $45$ degrees above the negative $x$ axis so rotating it another $45$ degrees places it on the $y$ axis where the $x$ coordinate is $0$, or $36000$ after reversing the subtractions already performed. It's just that your figure isn't drawn to scale so it could be misleading.
Here's a graph of the rotation but everything needs to be shifted up by $653000$ and to the right by $36000$:

A: firstly the distance you have find between two known points,is wrong:
$$\sqrt{(36000-35500)^2+(653000-653500)^2}\implies\sqrt{(500)^2+(-500)^2}\implies707.1\, approx.$$ 
then find its slope $m_2=\dfrac {653000-653500}{36000-35500}\implies m_2=-1$
suppose slope of 2nd line is $m_1$ then angle between two lines :
$$\tan \theta=|\dfrac{m_1-m_2}{1+m_1m_2}|$$
$$\tan 45^\circ=|\dfrac{m_1-m_2}{1+m_1m_2}|$$
$$1=|\dfrac{m_1+1}{1-m_1}|\implies m_1=0$$ it means this line is parallel to X-axis.So the coordinate $(x,y)$ will be $(x,653000)$.
Now use distance formula (I assume that your given value $538.5m$ is right.)
$$\sqrt{(x-36000)^2}=538.5$$
$$x=36538.5m$$
