A rectangle measures x by 10. The length of a diagonal of the rectangle is 2cm greater than the longer side x. Find x by forming an equation and solving it.