Since it takes 100 hours to fill the tank when both pipes are used together, in 1 hour, 1/100 of the tank will be filled. Pipe A contributes 1/x of the tank in one hour and pipe B contributes 1/y of the tank. So the two fractions added together fill 1/100 of the tank in an hour: 1/x+1/y=1/100.
Since pipe A fills 1/x tank in an hour, it would take it x hours to fill the tank by itself. Similarly, pipe B would take y hours.
Pipe A fills 6/x of the tank in 6 hours, leaving 1-6/x of the tank to be filled. Since pipe B takes y hours to fill the tank, it would take fewer hours if the tank was already partly filled. So, by proportion, it would take y(1-6/x) hours to top up the tank by itself. We know this time is 18 hours, so y(1-6/x)=18.
We have two equations in x and y, so we can work out the two variables. But there's something wrong! If A and B working together take 100 hours, it surely takes longer to fill the tank working in relay. So I think that 100 hours should be 10 hours. If we proceed as the question indicates, we'll see that we have a pipe removing rather than adding water to the tank.
Multiply the first equation through by 100xy: 100y+100x=xy. Multiply the second equation through by x: xy-6y=18x. Therefore xy=18x+6y=100y+100x, so 94y+82x=0 and x or y would be negative.
Let's replace 100 with 10: 18x+6y=10x+10y, 8x=4y so y=2x. 10x+20x=2x^2 (substituting for y in 10x+10y=xy). So x^2=15x, and x=15 (we disregard x=0). Therefore y=30.
Check: 1/15+1/30=3/30=1/10 and it takes pipe A 6 hours to fill 6/15=2/5 of a tank, leaving 3/5 left to fill. This will take pipe B 3/5 of 30 hours=18 hours to complete.
So with the adjustment, x=15 hours and y=30 hours.