How to insert formula into any shape (rectangle) in writer

I have model in writer and I need to insert (and group) formula into shape (for example sum formula into rectangle from Drawing toolbar).

I solve this problem with Drawing and copy to Writer