Given that the lengths of the three sides a right-angled triangle are x, x+ 1 and x + 2 units. Find the value of x.