Basically you know that the 2 wholes from both sides cancel out.
Set up the equation, 5/8 = 3/12 + 3/x
3/x = 5/8 - 3/12
Set them to have a common denominator, 3/x = 15/24 - 6/24
3/x = 9/24
Simplify 9/24 and you will get 3/8
3/x = 3/8
Obviously this means x = 8