The easiest approach is to make use of the various vlax-curve-* functions, specifically: vlax-curve-getclosestpointto (to obtain a point on the polyline, given a point obtained from the user), vlax-curve-getparamatpoint (to determine the parameter of the point returned), & vlax-curve-getfirstderiv (to obtain the tangent vector at the given point).
From the tangent vector, you can calculate a perpendicular vector which may be scaled by the distance 'X', or alternatively, you can calculate the angle of the tangent vector, add/subtract pi/2 radians, and calculate the offset points using the polar function.