The line y= 5 is perpendicularto the y-axis and not parallel.
When saying that the equation of the line is y= 5, then all y values will be 5 for any x value.
For example, some points on the line are : ( 0, 5) ( 1,5) , (-5,5) . (-4, 5).
When we draw these points we find that they form a horizontal line that is parallel to the x-axis and 5 units above the x-axis.
Then we can not say that the line given by y = k is parallel to the x-axis.
y= k ( k is constant) ==> y is parallel to the x-axis.
x = k ( K is a constant) ==> x is parallel to the y-axis.
The mistake here is that the line y = 5 is not vertical. The y axis is vertical, but this line would be horizontal. Therefore, they would be perpendicular.
If the line is y = 5, then y = 5 for every value of x. That means that you have a horizontal line that passes through points such as (0,5) and (2,5). That line is not parallel to the y axis, it is perpendicular, passing through the y axis at (0,5).
When you write y = 5 means that the line is intercepting y axis in the point (0,5).
Also, x = 3 represents a line that is intercepting x axis in the point (3;0).
So, when a coordinate has a value, the value is representing the intercepting point of the line and x or y axis.
You can calculate the intercepting point of a line and x axis, putting y = 0 in the equation of the line.