The prices of most coupon-paying bonds (not only corporates, but treasuries, munis, etc) are quoted "clean" (without the accrued coupon) rather than "dirty" (with the accrued coupon).
If you agree to buy a bond for a (clean) price $P$, then on the settlement date (generally 1-3 business days after your trade date, depending on the kind of the bond), you pay $P$ plus the interest accrued until the settlement date - what your paper denotes $AI$, times the notional. $P+AI$ is called the dirty price.
To mark to market your bond position on any day, you'd multiply the notional of your position by the that day's dirty price - i.e. by the sum of the clean price at which you could sell it (we'll ignore the bid-ask spread for this discussion) plus the interest accrued until the settlement date if you sold it that day.
So your formula just divides the dirty price that you could get at the end of the period plus and coupon payments by the dirty price at the beginning of the period. This is similar to how you'd calculate the reuturn on a stock over a period of time: divide the stock price at the end plus the dividends during the period by the stock price at the beginning.
There are two things I don't like about this formula. One is - it assumes that once you receive a coupon (or a dividend), you don't invest it somewhere where you'd earn interest on it. It's not a huge difference, but it implies that you're indifferent whether you receive a coupon sooner rather than later. The second thing that I don't like is that if you buy a corporate bond with money borrowed from your corporate treasury, then your corporate treasury will charge your financing, which will be much higher for a corporate bond (because it's credit-risky and illiquid) than for a treasury bond. Ignoring the cost of financing when you are trying to define the return on your position is not good.
The accrued interest is easy to compute, but how do you "compute" the bond price? Generally, you don't. It's something you observe or estimate, rather than compute, just like a stock price or a commodity price. If the bond is quoted as yield, rather than as price, then you compute the price from the yield by projecting its cash flows and discounting with this yield.
Observing a price of a corporate bond is harder than than of a stock, because a lot of bonds that don't trade frequently. If you find that this bond last traded several days ago at some price, this would not be a great prediction of the price today, unlike a stock that trades throughout the day. There are databases like FINRA's (most USD corporate bonds) and MiFID Liquid on Bloomberg Terminal (lots of EUR bonds) where you can find the last traded price. But you should not use stale prices for your marks or P&L.
Another approach is to use some kind of a simple model to estimate what a bond price should be by observing other proxy instruments (for example, other bonds from the same issuer that trade) and applying some kind of interpolation. Source BVAL on Bloomberg Terminal is a well-known example of model price.
Another approach is to collect quotes contributed by people who want to buy or sell this bond or mark their positions, and compute some consensus price (typiclaly, drop the outliers and compute the median). Sources BGN and CBBT on Bloomberg Terminal are examples. Other sources of consensus prices for corporate are IHS Markit (they are being bought by S&P, who'll probably rename it) and Refinitiv (former Reuters).