Let a,b,c be the lengths of the sides.
By the Pythagore theorem, you can suppose c the longest side and c²=a²+b² (1), and you know that a+b+c=24 (2)
The area of the triangle is ab/2 (because you've supposed a and b the sides of the right angle)
a and b are two consecutive even numbers. So you can write a is 2n and b is 2n+2.
ab/2 will be (2n*(2n+2))/2 = 2n*(n+1)=2n²+2n
By (2), we have 2n+2n+2+c=24 => c=22-4n => c²=484+16n²-176n
By (1), we have c²=4n²+4n²+4+8n=8n²+8n+4
=> n=20 (impossible because a+b+c=24) or n=3, and you replace in the area formula
(=> a=6 and b=8)