Попробуйте
def mult[N <: XInt, M <: XInt, P <: XInt, T <: HList](a: N :: M :: T, b: M :: P :: T): N :: P :: T =
(a, b) match { case (n :: _ :: t, _ :: p :: _) => n :: p :: t }
или
def mult[N <: XInt, M <: XInt, P <: XInt, T <: HList](a: N :: M :: T, b: M :: P :: T): N :: P :: T =
a.head :: b.tail.head :: b.tail.tail
или просто
def mult[N <: XInt, M <: XInt, P <: XInt, T <: HList](a: N :: M :: T, b: M :: P :: T): N :: P :: T =
a.head :: b.tail