The Pythagorean theorem's converse is also true, and states that if the sum of the squares of two sides of a triangle equals the square of the third side, then the triangle is a right triangle.
Using the distance formula
#"dist"((x_1, y_1)"",(x_2, y_2)) = sqrt((x_2-x_1)^2+(y_2-y_1)^2)#
we can calculate the squares of the lengths of each side:
#AB^2 = (3-2)^2+(5-0)^2 = 26#
#AC^2 = (0-2)^2+(y-0)^2 = y^2+4#
#BC^2 = (0-3)^2+(y-5)^2 = y^2-10y+34#
Now we can consider all cases in which two of those sum to the third, and what values of #y# make that true.
Case 1: #AB^2 + AC^2 = BC^2#
#=> y^2+30 = y^2-10y+34#
#=> 10y = 4#
#=> y = 2/5#
Case 2: #AB^2+BC^2=AC^2#
#=> y^2-10y+60 = y^2+4#
#=> 10y = 56#
#=> y = 28/5#
Case 3: #AC^2+BC^2=AB^2#
#=> 2y^2-10y+38 = 26#
#=> 2y^2-10y+12 = 0#
#=> y^2-5y+6 = 0#
#=> (y-2)(y-3) = 0#
#=> y-2 = 0 or y-3 = 0#
#=> y = 2 or y = 3#
By the Pythagorean theorem's converse, we know that all of the above #y# values result in right triangles, and as those are the only values which result in the Pythagorean theorem holding true, we know that there are no other values for #y# which work. Thus we have the solution set
#y in {2/5, 2, 3, 28/5}#