I have a problem where I want to rotate branch so that one of its sides is on the y-axis and the centre of the branch is moved to (x=0,y=0). I want to know the values of the new rotated coordinates in terms of the original coordinates. See picture below:
To get yp2* is obvious to me because it's the length of the side but I can't get the other rotated coordinates in terms of the original coordinates.
If the angles between the three branches are all $2\pi/3$, and the branches that appear to be vertical are vertical, as the drawing suggests, then you're looking at a translation followed by a clockwise rotation by $\pi/3$ radians.
You ought to just write out that transformation, and then you will know the destination of any point.
The translation alone is $\left[\begin{smallmatrix}x\\y\end{smallmatrix}\right]\mapsto \left[\begin{smallmatrix}x-x_{p1}\\y-y_{p1}\end{smallmatrix}\right]$.
The rotation is $\left[\begin{smallmatrix}x\\y\end{smallmatrix}\right]\mapsto \left[\begin{smallmatrix}\frac12 &\frac{\sqrt{3}}{2}\\ -\frac{\sqrt{3}}{2}&\frac12\end{smallmatrix}\right]\left[\begin{smallmatrix}x\\y\end{smallmatrix}\right]$. If you don't recognize how I'm getting a rotation matrix with an angle, you really ought to google the topic.
Compose these two transformations, and you have a mapping from old points to new points.
If the angles are not as they appear, then the procedure is the same, you just have to deduce the angle of rotation for the rotation matrix. By simple trigonometry on the branch getting rotated downward, the angle is $\arccos\left(\frac{x_{p2}}{\sqrt{x_{p2}^2+y_{p2}^2}}\right)$.