Could I have won the following game instead of stalemate?
Yes easily. 48 move your rook to g8. His only legal move then is King to H5. From there you only have to wait for your king and his to be in line with each other and then move your rook to the H file.
I agree with blowerd - 48. Rg8 Kh5 49. g3 Kh6 50. Rh8# was a mate in 3.
thank you for your responses
you could ofwon but you still did good
Could I have won the following game instead of stalemate?