Manually trim select mline then pick point at midpoint of each side of red plines seems to work. So get all rectangs do a offset and get te co-ords of that new pline then use ssget "F" to get the touching mlines, the trim point is mid of the 2 mlines points.
; https://www.cadtutor.net/forum/topic/77526-how-to-trim-the-intersected-line-between-mline-polyline/
; Trim mlines touching plines
; by AlanH May 2023
(defun c:cuts ( / )
(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)
(setq ss (ssget '((0 . "lwpolyline"))))
(if ss
(repeat (setq x (sslength ss))
(setq ent (ssname ss (setq x (1- x))))
(setq obj (vlax-ename->vla-object ent))
(setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget ent))))
(setq co-ord (cons (last co-ord) co-ord))
(command "offset" 10 ent (getvar 'extmax) "")
(setq co-ord2 (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (entlast)))))
(setq co-ord2 (cons (last co-ord2) co-ord2))
(entdel (entlast))
(setq ss2 (ssget "f" co-ord2 '((0 . "MLINE"))))
(setq mpts '())
(repeat (setq j (sslength ss2))
(setq ent2 (ssname ss2 (setq j (1- j))))
(setq obj2 (vlax-ename->vla-object ent2))
(setq intpts (vlax-invoke obj 'intersectWith obj2 acExtendThisEntity))
(setq mp (mapcar '* (mapcar '+ (list (nth 0 intpts) (nth 1 intpts) 0.0)(list (nth 3 intpts) (nth 4 intpts) 0.0)) '(0.5 0.5 0.5)))
(setq mpts (cons mp mpts))
)
(command "trim" ss2 "")
(foreach pt mpts
(command pt)
)
(command "")
)
(alert "no plines")
)
(princ)
)
(c:cuts)