Two lasers between two mirrors
JavaScript (ES6), 149 bytes
Takes input in currying syntax (w)(h)([a,b]).

w=&gt;h=&gt;g=(p,d=[1,-1],s=Array(w).fill` `)=&gt;h--?`|${p=p.map((x,i)=&gt;~(k=d[i],s[x]='/X\\'[x-p[i^1]?k+1:1],x+=k)&amp;&amp;x&lt;w?x:x+(d[i]=-k)),s.join``}|
`+g(p,d):''

Try it online!
Commented
w =&gt; h =&gt;                  // w = width, h = height
  g = (                    // g = recursive function taking:
    p,                     //   p[] = array holding the point coordinates
    d = [1, -1],           //   d[] = directions
    s = Array(w).fill` `   //   s = array of w spaces (we can't use a string because it's
  ) =&gt;                     //       immutable in JS)
    h-- ?                  // if we haven't reached the last row yet:
      `|${                 //   append the left pipe
      p = p.map((x, i) =&gt;  //   for each x at position i in p[]:
        ~(k = d[i],        //     k = direction for this point
          s[x] = '/X\\'[   //     insert either '/', 'X' or '\' at position x in s
            x - p[i ^ 1] ? //     if p[0] != p[1]:
              k + 1        //       use the direction
            :              //     else:
              1            //       force 'X'
          ], x += k        //     add k to x
        ) &amp;&amp;               //     if the result is not equal to -1
        x &lt; w ?            //     and is less than w:
          x                //       use the current value of x
        :                  //     else:
          x + (d[i] = -k)  //       change the direction and restore the initial value of x
      ),                   //   end of map()
      s.join``}|\n` +      //   join and append s; append the right bar and a linefeed
      g(p, d)              //   followed by the result of a recursive call
    :                      // else:
      ''                   //   stop recursion