please accept my apology if this is the wrong place or style as to ask a question like this. I usually post in StackOverFlow, so I don't know if there's any specific maths rules... While I deal with algebra all day with programming, maths isn't exactly my strong point.
Firstly, is there a website that can rearrange maths equations without having to ask anyone?
I'm currently writing a windows program to be able to view audio waveforms and need to be able to scroll across and zoom. However, I'm having trouble with the scrollbar offset being out by about 1%-+, so I thought I'd reverse engineer the equation that displays the time correctly where the cursor hovers.
X is actually the mouse cursor position in this.
I was wondering if you'd be able to help me rearrange this equation to have "X = equation"?
CurrentSample = ( (SamplesPerPixel / bytesPerSample) + (display_offset * X ) ) + OffsetToAdd
I believe that if I can get X, then I can use all the other values to be able to locate a marker correctly on the window form.
To give better context of what I'm doing, here's some images.
Shown in this first picture, where there is 0 offset in the horizontal bar, all of the cue points line up correctly.

However, in this second image, the horizontal bar has moved across a little, and at the 30 seconds mark where the orange line is, you'll see that the cue lines with the offsets are displaying incorrectly and not quite far enough across, however, the cursor is at the correct time.

As mentioned, if this is the wrong place to ask, I'll look elsewhere. Thanks in advance.