Ashley spent 3x + 2hours on her science project and Adam spent 4x - 6 hours on his science project. If they spent a total of 31 hours on their projects, find the value of x