To type a fraction use / like:

(x+1)/(x+2) + 1/3 = 5

https://www.mathpapa.com/algebra-calculator.html?q=(x%2B1)%2F%5Cleft(x%2B2%5Cright)%2B1%2F3%5C%20%3D%5C%205