If an accident had happened and you showed the footage, I think you'd end up being blamed. Yes you joined, the speeds were similar, but then you accelerated slightly to pull along side for an undertake where you should have actually overtaken instead. You may have been coming off at that junction, but the lines (at that time) didn't indicate a total separation (i.e. solid line or closer together) so has to be treated like a normal 3 lane motorway. Personally would have hung back and either waited, or hung back, over took and back in. Never remain in a blind spot or next to the lorry if you can help it. Having said all that, we've all done similar and fortunately you both were quick enough to react.