how do I calculate the value of x for both of these questions? I'm so confused.