How to align 3D viewport along two 3D points using python
Track to quaternion.
Can get the quaternion rotation of any vector using Vector.to_track_quat(track, up) and assign an axis to track and an axis for up.
Test script to make the largest 3d view in the area track from the scene camera to the active object.
import bpy

context = bpy.context
scene = context.scene
cam = scene.camera
ob = context.object

start = cam.matrix_world.translation
stop  = ob.matrix_world.translation

norm = start - stop
norm.normalize()

q = norm.to_track_quat()

viewports_3D = [
        a
        for a in context.screen.areas
        if a.type == 'VIEW_3D'
        ]

viewports_3D.sort(
        key=lambda vp: (vp.width * vp.height), 
        )     

# use max area vp
if viewports_3D: 
    vp = viewports_3D.pop() # largest
    r3d = vp.spaces.active.region_3d
    r3d.view_rotation = q
    r3d.view_location = start #lookat this point
    r3d.view_distance = 0 # from this far away

Note above uses default for track to so vector is flipped, more concise would be
norm = stop - start #start - stop
norm.normalize()

q = norm.to_track_quat('-Z', 'Y')

This is equivalent of the result of adding a track to constraint on camera to object. Have used to test