Let the three sides be: x, %28x%2B2%29, %28x%2B4%29
then the perimeter:
p+=+x+%2B+%28x%2B2%29+%2B+%28x%2B4%29
p+=+3x+%2B+6
- the longest side is it is 22 units shorter than the perimeter, so you will have
%283x%2B6%29+-+%28x%2B4%29+=+22
3x+%2B+6+-+x+-+4+=+22
2x+%2B+2+=+22
2x+=+22+-+2
2x+=+20
x+=+10, ........the shortest side
then
10+%2B+4+=+14 units is the longest side