When three times a number is added to the square of a number, the result is 10. Find the number