Word does not have a tool like that built into the equation editor. Also, I suspect that if there was such a tool, it wouldn't allow you to specify different colors as in your sample.
You can use the drawing tools in the Insert > Shape gallery. It's possible to draw lines on top of the equation. You then have control of the colors, thicknesses, and lengths of the lines.
Unfortunately, the anchor point for the lines (the place where your cursor is when you start drawing) can't be in the same paragraph with a centered display equation -- whenever there is anything else in the same paragraph, Word insists on changing the equation
to "in-line", making the numbers in the fractions smaller.
My favored solution is to make a 3-column x 1-row table and enter the equation in the middle cell. Then you can anchor the lines in either the left cell or the right cell without affecting the location of the equation. When you turn off the table's borders,
it becomes invisible and displays only the contents. (You could just press Enter after the equation and anchor the lines in the next paragraph, but that's fragile; if the equation and its following paragraph fall on different pages, the lines will stay with
the paragraph instead of the equation.)
Here's what it looks like in Word:

