You answer this type of question with a contour probability map.
I have done the map here:
https://www.geogebra.org/classic/epd8ewqe
x and y both have to be between 0 and 9 so the area for this is 3*3=9
Then for it to be a triangle, the sum of any 2 sides must be greater than the 3rd side
So I have graphed
x+y>2
x+2>y
y+2>x
The intersection of all those regions is the favourable outcomes. Area = 6
SO the probability of a favourable outcome is 6/9 = 2/3