Triangle ABC and DEF are congruent. Find x.

triangle ABC:
side AB measures x+6
side BC measures x
side CA measures x+4

triangle DEF:
side DE measures 3x-5