They are similar but not not congruent. How? They both have a 90 degree angle and three sides.
They slopes are the same. If you simplify both slopes, you will get the same answer.
Y is a function of X because you can cross the slope only once which is a function, but twice wouldn't be a function.
I am still not sure about the slopes being the same or not.