You can't connect a field output into a constant input, because the former represents a list (or a generator, if you know Python) of values, while the latter represents just a single value. You can use an Attribute Statistic node to convert between the two. However, in your case you simply want to scale your endpoint vectors, which will have the same effect as using the Scale Elements node:

If you want to specify an offset, you can do that, but then one of the endpoints will only define a direction - you can't eat your cake and have it too:

You could calculate how many vertices should there be for the given endpoints and a desired offset, but then you have to decide if you're willing to go beyond the endpoints to get the offset, or adjust the offset slightly...
0and Domain Size: vertices -1. Then if you don't want to spawn another object, you can subdivide it first and remove the excess vertices. You can then lerp between the endpoints using Mix RGB node, you could also clamp and merge by distance to get rid of the excess verts... – Markus von Broady Oct 04 '22 at 14:53Yes, as you would note in the screenshot, my mesh was created with Mesh Line with count 2 and has only a single edge
– R M K Oct 04 '22 at 16:32