title: How to find the X coordinate of a point on a line given another point of the line and the 2 points on a perpendicular line?
body: <p>I'm writing a python app to select rectangular areas, when the user has set 2 points (the length of the rectangle), the third and 4th points are constrained in forming a rectangle, where the width of the rectangle is given by the Y difference of the mouse cursor and the last point.</p>
  
  <p>Here's a quick picture to explain, I'm looking for the X coordinate of the point C.</p>
  
  <p><a href="https://i.stack.imgur.com/blBt1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/blBt1.png" alt="enter image description here"></a></p>
  
  <p>I know :</p>
  
  <ul>
  <li>A(2,3) </li>
  <li>B(5,5) </li>
  <li>angle = 90 degrees</li>
  <li>the Y coordinate of C is 7.</li>
  </ul>
  
  <p>I'm not sure how to tackle this... using vectors ? I'm using numpy in my project.</p>